Package org.glassfish.pfl.tf.timer.impl
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 Summary
Fields Modifier and Type Field Description protected java.util.ArrayList<StatisticsAccumulator>
saList
protected static java.lang.String
UNITS
-
Constructor Summary
Constructors Modifier Constructor Description protected
StatsEventHandlerBase(TimerFactory factory, java.lang.String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
clear()
Discard all accumulated statistics.protected void
notify(java.util.Stack<TimerEvent> teStack, TimerEvent event)
protected abstract void
recordDuration(int id, long duration)
java.util.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 class org.glassfish.pfl.tf.timer.spi.NamedBase
equals, factory, hashCode, name, setFactory, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.glassfish.pfl.tf.timer.spi.TimerEventHandler
notify
-
-
-
-
Field Detail
-
UNITS
protected static final java.lang.String UNITS
- See Also:
- Constant Field Values
-
saList
protected java.util.ArrayList<StatisticsAccumulator> saList
-
-
Constructor Detail
-
StatsEventHandlerBase
protected StatsEventHandlerBase(TimerFactory factory, java.lang.String name)
-
-
Method Detail
-
clear
public void clear()
Description copied from interface:StatsEventHandler
Discard all accumulated statistics.- Specified by:
clear
in interfaceStatsEventHandler
-
recordDuration
protected abstract void recordDuration(int id, long duration)
-
notify
protected final void notify(java.util.Stack<TimerEvent> teStack, TimerEvent event)
-
stats
public java.util.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 interfaceStatsEventHandler
-
-