Interface StatsEventHandler

All Superinterfaces:
Named, TimerEventHandler
All Known Implementing Classes:
MultiThreadedStatsEventHandlerImpl, StatsEventHandlerBase, StatsEventHandlerImpl

public interface StatsEventHandler extends TimerEventHandler
Gather statistics on the times reported to this TimerEventHandler. It will keep events from different thread separated in order to get good results, but the result of the stats call merges all of the results together.

The time is the duration between an enter and an exit call to a timer from the same thread. Recursive calls are matched, and the results accumulated as in any other case.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Discard all accumulated statistics.
    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).

    Methods inherited from interface org.glassfish.pfl.tf.timer.spi.Named

    factory, name

    Methods inherited from interface org.glassfish.pfl.tf.timer.spi.TimerEventHandler

    notify
  • Method Details

    • stats

      Map<Timer,Statistics> stats()
      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).
    • clear

      void clear()
      Discard all accumulated statistics.