Class StatsSubsystem

java.lang.Object
com.netscape.cmscore.util.StatsSubsystem
All Implemented Interfaces:
ISubsystem, IStatsSubsystem

public class StatsSubsystem extends Object implements IStatsSubsystem
A class represents a internal subsystem. This subsystem can be loaded into cert server kernel to perform statistics collection.

Version:
$Revision$, $Date$
Author:
thomask
  • Constructor Details

    • StatsSubsystem

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

    • getId

      public String getId()
      Retrieves subsystem identifier.
      Specified by:
      getId in interface ISubsystem
      Returns:
      subsystem identifier
    • setId

      public void setId(String id) throws EBaseException
      Description copied from interface: ISubsystem
      Sets specific to this subsystem.
      Specified by:
      setId in interface ISubsystem
      Parameters:
      id - subsystem identifier
      Throws:
      EBaseException - failed to set id
    • init

      public void init(ConfigStore config) throws EBaseException
      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.

      Specified by:
      init in interface ISubsystem
      Parameters:
      config - configuration store
      Throws:
      EBaseException
    • getStartTime

      public Date getStartTime()
      Description copied from interface: IStatsSubsystem
      Retrieves the start time since startup or clearing of statistics.
      Specified by:
      getStartTime in interface IStatsSubsystem
    • startTiming

      public void startTiming(String id)
      Description copied from interface: IStatsSubsystem
      Starts timing of a operation.
      Specified by:
      startTiming in interface IStatsSubsystem
    • startTiming

      public void startTiming(String id, boolean mainAction)
      Specified by:
      startTiming in interface IStatsSubsystem
    • endTiming

      public void endTiming(String id)
      Description copied from interface: IStatsSubsystem
      Stops timing of a operation.
      Specified by:
      endTiming in interface IStatsSubsystem
    • resetCounters

      public void resetCounters()
      Description copied from interface: IStatsSubsystem
      Resets counters.
      Specified by:
      resetCounters in interface IStatsSubsystem
    • getMainStatsEvent

      public StatsEvent getMainStatsEvent()
      Description copied from interface: IStatsSubsystem
      Resets all internal counters.
      Specified by:
      getMainStatsEvent in interface IStatsSubsystem
    • startup

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

      public void shutdown()
      Stops this system.
      Specified by:
      shutdown in interface ISubsystem
    • getConfigStore

      public ConfigStore getConfigStore()
      Description copied from interface: ISubsystem
      Returns the root configuration storage of this system.

      Specified by:
      getConfigStore in interface ISubsystem
      Returns:
      configuration store of this subsystem