Class LoggerModel

java.lang.Object
xal.service.pvlogger.LoggerModel

public class LoggerModel extends Object
LoggerModel is the main model for the pvlogger service. It manages the logger sessions.
Author:
tap
  • Constructor Details

    • LoggerModel

      public LoggerModel()
      LoggerModel constructor
  • Method Details

    • startLogging

      public void startLogging()
      Start logging
    • restartLogger

      public void restartLogger()
      Restart the logger. Stop logging, reload groups from the database and resume logging.
    • reloadGroups

      public void reloadGroups()
      Reload the channel groups from the persistent store
    • reloadLoggerSession

      public boolean reloadLoggerSession(String groupID)
      reload the group identified by the group ID
    • fetchChannelGroupTypes

      protected String[] fetchChannelGroupTypes()
      Fetch the channel group types from the state store
      Returns:
      an array of channel group types in the state store
    • getSessionModel

      public SessionModel getSessionModel(String groupType)
      Get the session model identified by the specified group type
      Parameters:
      groupType - the identifier of the group
      Returns:
      the session model for the specified type or null if there is no match
    • getLoggerSession

      public LoggerSession getLoggerSession(String groupType)
      Get the logger session identified by the specified group type
      Parameters:
      groupType - the identifier of the group
      Returns:
      the logger session for the specified type or null if there is no match
    • getPVLogger

      public PVLogger getPVLogger()
      Get the PV Logger
      Returns:
      the PV Logger
    • getSessionTypes

      public Collection<String> getSessionTypes()
      Get the list of session types
      Returns:
      the list of session types
    • publishSnapshots

      public void publishSnapshots()
      publish snapshots in the buffer
    • resumeLogging

      public void resumeLogging()
      Resume logging.
    • stopLogging

      public void stopLogging()
      Stop logging
    • shutdown

      public void shutdown(int code)
      Shutdown the service
      Parameters:
      code - The shutdown code which is normally just 0.
    • getLaunchTime

      public static Date getLaunchTime()
      Get the launch time of the service.
      Returns:
      the launch time in seconds since the Java epoch of January 1, 1970.