Class StatsSubsystem

java.lang.Object
com.netscape.certsrv.base.Subsystem
com.netscape.cmscore.util.StatsSubsystem

public class StatsSubsystem extends Subsystem
A class represents a internal subsystem. This subsystem can be loaded into cert server kernel to perform statistics collection.
Author:
thomask
  • Field Details

  • Constructor Details

    • StatsSubsystem

      public StatsSubsystem()
      Constructs a certificate server.
  • Method Details

    • getId

      public String getId()
      Retrieves subsystem identifier.
      Overrides:
      getId in class Subsystem
      Returns:
      subsystem identifier
    • setId

      public void setId(String id) throws EBaseException
      Description copied from class: Subsystem
      Sets the identifier of this subsystem.
      Overrides:
      setId in class Subsystem
      Parameters:
      id - subsystem identifier
      Throws:
      EBaseException - failed to set id
    • init

      public void init(ConfigStore config) throws Exception
      Initializes this subsystem with the given configuration store. It first initializes resident subsystems, and it loads and initializes loadable subsystem specified in the configuration store. Note that individual subsystem should be initialized in a separated thread if it has dependency on the initialization of other subsystems.
      Overrides:
      init in class Subsystem
      Parameters:
      config - Subsystem configuration
      Throws:
      Exception - Unable to initialize subsystem
    • getStartTime

      public Date getStartTime()
      Retrieves the start time since startup or clearing of statistics.
    • startTiming

      public void startTiming(String id)
      Starts timing of a operation.
    • startTiming

      public void startTiming(String id, boolean mainAction)
    • endTiming

      public void endTiming(String id)
      Stops timing of a operation.
    • resetCounters

      public void resetCounters()
      Resets counters.
    • getMainStatsEvent

      public StatsEvent getMainStatsEvent()
      Resets all internal counters.
    • startup

      public void startup() throws EBaseException
      Description copied from class: Subsystem
      Notifies this subsystem if owner is in running mode.
      Overrides:
      startup in class Subsystem
      Throws:
      EBaseException - failed to start up
    • shutdown

      public void shutdown()
      Stops this system.
      Overrides:
      shutdown in class Subsystem
    • getConfigStore

      public ConfigStore getConfigStore()
      Description copied from class: Subsystem
      Returns the configuration store.
      Overrides:
      getConfigStore in class Subsystem
      Returns:
      configuration store