Class StatsSubsystem

  • All Implemented Interfaces:
    ISubsystem, com.netscape.certsrv.util.IStatsSubsystem

    public class StatsSubsystem
    extends java.lang.Object
    implements com.netscape.certsrv.util.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
    • Field Summary

      • Fields inherited from interface com.netscape.certsrv.util.IStatsSubsystem

        ID
    • Constructor Summary

      Constructors 
      Constructor Description
      StatsSubsystem()
      Constructs a certificate server.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void endTiming​(java.lang.String id)
      Stops timing of a operation.
      IConfigStore getConfigStore()
      Returns the root configuration storage of this system.
      java.lang.String getId()
      Retrieves subsystem identifier.
      com.netscape.certsrv.util.StatsEvent getMainStatsEvent()
      Resets all internal counters.
      java.util.Date getStartTime()
      Retrieves the start time since startup or clearing of statistics.
      void init​(IConfigStore config)
      Initializes this subsystem with the given configuration store.
      void resetCounters()
      Resets counters.
      void setId​(java.lang.String id)
      Sets specific to this subsystem.
      void shutdown()
      Stops this system.
      void startTiming​(java.lang.String id)
      Starts timing of a operation.
      void startTiming​(java.lang.String id, boolean mainAction)  
      void startup()
      Notifies this subsystem if owner is in running mode.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StatsSubsystem

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

      • getId

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

        public void setId​(java.lang.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​(IConfigStore 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 - failed to initialize
      • getStartTime

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

        public void startTiming​(java.lang.String id)
        Description copied from interface: com.netscape.certsrv.util.IStatsSubsystem
        Starts timing of a operation.
        Specified by:
        startTiming in interface com.netscape.certsrv.util.IStatsSubsystem
      • startTiming

        public void startTiming​(java.lang.String id,
                                boolean mainAction)
        Specified by:
        startTiming in interface com.netscape.certsrv.util.IStatsSubsystem
      • endTiming

        public void endTiming​(java.lang.String id)
        Description copied from interface: com.netscape.certsrv.util.IStatsSubsystem
        Stops timing of a operation.
        Specified by:
        endTiming in interface com.netscape.certsrv.util.IStatsSubsystem
      • resetCounters

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

        public com.netscape.certsrv.util.StatsEvent getMainStatsEvent()
        Description copied from interface: com.netscape.certsrv.util.IStatsSubsystem
        Resets all internal counters.
        Specified by:
        getMainStatsEvent in interface com.netscape.certsrv.util.IStatsSubsystem
      • shutdown

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

        public IConfigStore 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