Interface RemoteLogging

All Known Implementing Classes:
LoggerService

public interface RemoteLogging
Interface for communicating with a remote PV logger
  • Field Details

  • Method Details

    • setLoggingPeriod

      void setLoggingPeriod(String groupType, double period)
      Set the period between events where we take and store machine snapshots for the specified group.
      Parameters:
      groupType - identifies the group by type
      period - The period in seconds between events where we take and store machine snapshots.
    • publishSnapshots

      void publishSnapshots()
      publish snapshots in the snapshot buffer
    • takeAndPublishSnapshot

      int takeAndPublishSnapshot(String groupID, String comment)
      Take a snapshot and publish it.
      Parameters:
      groupID - ID of the group for which to take the snapshot
      comment - snapshot comment
      Returns:
      machine snapshot ID or an error code (less than 0) if the attempt fails
    • getLoggingPeriod

      double getLoggingPeriod(String groupType)
      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

      boolean hasLoggerSession(String groupID)
      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

      boolean isLogging(String groupType)
      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

      boolean reloadLoggerSession(String groupType)
      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

      Date getLastChannelEventTime(String groupType)
      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

      Date getLastLoggerEventTime(String groupType)
      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

      List<String> getGroupTypes()
      Get the list of group types
      Returns:
      a list of the group types
    • getChannelCount

      int getChannelCount(String groupType)
      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

      List<Map<String,Object>> getChannels(String groupType)
      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

      Date getTimestampOfLastPublishedSnapshot(String groupType)
      Get the timestamp of the last published snapshot
      Parameters:
      groupType - identifies the group by type
      Returns:
      the timestamp of the last published snapshot
    • getLastPublishedSnapshotDump

      String getLastPublishedSnapshotDump(String groupType)
      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