Top Description Methods
org.glassfish.pfl.tf.timer.spi

public Interface StatsEventHandler

extends TimerEventHandler
Known Direct Implementers
org.glassfish.pfl.tf.timer.impl.StatsEventHandlerBase
Imports
java.util.Map

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 TypeMethod and Description
public void
clear()

Discard all accumulated statistics.

public 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).

Inherited from org.glassfish.pfl.tf.timer.spi.TimerEventHandler:
notify

Method Detail

clearback to summary
public void clear()

Discard all accumulated statistics.

statsback to summary
public 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).