Package xal.service.pvlogger
Interface RemoteLogging
- All Known Implementing Classes:
LoggerService
public interface RemoteLogging
Interface for communicating with a remote PV logger
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionint
getChannelCount
(String groupType) Get the number of channels we wish to log.getChannels
(String groupType) Get the list of channel info tables.Get the list of group typesGet a heartbeat from the service.Get the name of the host where the application is running.getLastChannelEventTime
(String groupType) Get the timestamp of the last channel event (e.g. channel connected/disconnected event)getLastLoggerEventTime
(String groupType) Get the timestamp of the last logger eventgetLastPublishedSnapshotDump
(String groupType) Get the textual dump of the last published snapshotGet the launch time of the service.double
getLoggingPeriod
(String groupType) Get the logging period.getTimestampOfLastPublishedSnapshot
(String groupType) Get the timestamp of the last published snapshotboolean
hasLoggerSession
(String groupID) Determine if a logger session exists for the specified groupboolean
Determine if the logger is presently loggingvoid
publish snapshots in the snapshot bufferboolean
reloadLoggerSession
(String groupType) reload the logger session identified by the group typevoid
Stop logging, reload groups from the database and resume logging.void
Resume the logger logging.void
setLoggingPeriod
(String groupType, double period) Set the period between events where we take and store machine snapshots for the specified group.void
shutdown
(int code) Shutdown the process without waiting for a response.void
Stop the logger.int
takeAndPublishSnapshot
(String groupID, String comment) Take a snapshot and publish it.
-
Field Details
-
CHANNEL_SIGNAL
- See Also:
-
CHANNEL_CONNECTED
- See Also:
-
-
Method Details
-
setLoggingPeriod
Set the period between events where we take and store machine snapshots for the specified group.- Parameters:
groupType
- identifies the group by typeperiod
- The period in seconds between events where we take and store machine snapshots.
-
publishSnapshots
void publishSnapshots()publish snapshots in the snapshot buffer -
takeAndPublishSnapshot
Take a snapshot and publish it.- Parameters:
groupID
- ID of the group for which to take the snapshotcomment
- snapshot comment- Returns:
- machine snapshot ID or an error code (less than 0) if the attempt fails
-
getLoggingPeriod
Get the logging period.- Parameters:
groupType
- identifies the group by type- Returns:
- The period in seconds between events where we take and store machine snapshots.
-
hasLoggerSession
Determine if a logger session exists for the specified group- Parameters:
groupID
- group ID of the logger session for which to look- Returns:
- true if a session exists for the group and false if not
-
isLogging
Determine if the logger is presently logging- Parameters:
groupType
- identifies the group by type- Returns:
- true if the logger is logging and false if not
-
reloadLoggerSession
reload the logger session identified by the group type -
restartLogger
void restartLogger()Stop logging, reload groups from the database and resume logging. -
resumeLogging
void resumeLogging()Resume the logger logging. -
stopLogging
void stopLogging()Stop the logger. -
shutdown
void shutdown(int code) Shutdown the process without waiting for a response.- Parameters:
code
- The shutdown code which is normally just 0.
-
getHostName
String getHostName()Get the name of the host where the application is running.- Returns:
- The name of the host where the application is running.
-
getLaunchTime
Date getLaunchTime()Get the launch time of the service.- Returns:
- the launch time in seconds since the Java epoch of January 1, 1970.
-
getHeartbeat
Date getHeartbeat()Get a heartbeat from the service.- Returns:
- the time measured from the service at which the heartbeat was sent
-
getLastChannelEventTime
Get the timestamp of the last channel event (e.g. channel connected/disconnected event)- Parameters:
groupType
- identifies the group by type- Returns:
- the wall clock timestamp of the last channel event
-
getLastLoggerEventTime
Get the timestamp of the last logger event- Parameters:
groupType
- identifies the group by type- Returns:
- the wall clock timestamp of the last logger event
-
getGroupTypes
Get the list of group types- Returns:
- a list of the group types
-
getChannelCount
Get the number of channels we wish to log.- Parameters:
groupType
- identifies the group by type- Returns:
- the number of channels we wish to log
-
getChannels
Get the list of channel info tables. Each channel info table contains the PV signal name and the channel connection status.- Parameters:
groupType
- identifies the group by type- Returns:
- The list channel info tables corresponding to the channels we wish to log
-
getTimestampOfLastPublishedSnapshot
Get the timestamp of the last published snapshot- Parameters:
groupType
- identifies the group by type- Returns:
- the timestamp of the last published snapshot
-
getLastPublishedSnapshotDump
Get the textual dump of the last published snapshot- Parameters:
groupType
- identifies the group by type- Returns:
- the textual dump of the last published snapshot or null if none exists
-