Class StatsEventHandlerBase

java.lang.Object
org.glassfish.pfl.tf.timer.spi.NamedBase
org.glassfish.pfl.tf.timer.impl.StatsEventHandlerBase
All Implemented Interfaces:
Named, StatsEventHandler, TimerEventHandler
Direct Known Subclasses:
MultiThreadedStatsEventHandlerImpl, StatsEventHandlerImpl

public abstract class StatsEventHandlerBase extends NamedBase implements StatsEventHandler
  • Field Details

  • Constructor Details

    • StatsEventHandlerBase

      protected StatsEventHandlerBase(TimerFactory factory, String name)
  • Method Details

    • clear

      public void clear()
      Description copied from interface: StatsEventHandler
      Discard all accumulated statistics.
      Specified by:
      clear in interface StatsEventHandler
    • recordDuration

      protected abstract void recordDuration(int id, long duration)
    • notify

      protected final void notify(Stack<TimerEvent> teStack, TimerEvent event)
    • stats

      public Map<Timer, Statistics> stats()
      Description copied from interface: StatsEventHandler
      Return map that gives the accumulated statistics for each TimerEvent that has been observed by this event handler since the last call to clear (or since the creation of this handler, if clear has not been called).
      Specified by:
      stats in interface StatsEventHandler