Package xal.service.pvlogger
Class LoggerModel
java.lang.Object
xal.service.pvlogger.LoggerModel
LoggerModel is the main model for the pvlogger service. It manages the logger
sessions.
- Author:
- tap
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]
Fetch the channel group types from the state storestatic Date
Get the launch time of the service.getLoggerSession
(String groupType) Get the logger session identified by the specified group typeGet the PV LoggergetSessionModel
(String groupType) Get the session model identified by the specified group typeGet the list of session typesvoid
publish snapshots in the buffervoid
Reload the channel groups from the persistent storeboolean
reloadLoggerSession
(String groupID) reload the group identified by the group IDvoid
Restart the logger.void
Resume logging.void
shutdown
(int code) Shutdown the servicevoid
Start loggingvoid
Stop logging
-
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
reload the group identified by the group ID -
fetchChannelGroupTypes
Fetch the channel group types from the state store- Returns:
- an array of channel group types in the state store
-
getSessionModel
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
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
Get the PV Logger- Returns:
- the PV Logger
-
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
Get the launch time of the service.- Returns:
- the launch time in seconds since the Java epoch of January 1, 1970.
-