org.glassfish.pfl.tf.timer.spi
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
 void clear()
          Discard all accumulated statistics.
 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).
 
Methods inherited from interface org.glassfish.pfl.tf.timer.spi.TimerEventHandler
notify
 
Methods inherited from interface org.glassfish.pfl.tf.timer.spi.Named
factory, name
 

Method Detail

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.



Copyright © 2013 Oracle. All Rights Reserved.