Package org.glassfish.pfl.tf.timer.impl
Class MultiThreadedStatsEventHandlerImpl
- java.lang.Object
-
- org.glassfish.pfl.tf.timer.spi.NamedBase
-
- org.glassfish.pfl.tf.timer.impl.StatsEventHandlerBase
-
- org.glassfish.pfl.tf.timer.impl.MultiThreadedStatsEventHandlerImpl
-
- All Implemented Interfaces:
Named,StatsEventHandler,TimerEventHandler
public class MultiThreadedStatsEventHandlerImpl extends StatsEventHandlerBase
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ObjectsaListLockprivate java.lang.ThreadLocal<java.util.ArrayList<java.util.Stack<TimerEvent>>>tlsteList-
Fields inherited from class org.glassfish.pfl.tf.timer.impl.StatsEventHandlerBase
saList, UNITS
-
-
Constructor Summary
Constructors Constructor Description MultiThreadedStatsEventHandlerImpl(TimerFactory factory, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Discard all accumulated statistics.private java.util.Stack<TimerEvent>getSteElement(int id)voidnotify(TimerEvent event)protected voidrecordDuration(int id, long duration)-
Methods inherited from class org.glassfish.pfl.tf.timer.impl.StatsEventHandlerBase
notify, stats
-
Methods inherited from class org.glassfish.pfl.tf.timer.spi.NamedBase
equals, factory, hashCode, name, setFactory, toString
-
-
-
-
Field Detail
-
saListLock
private java.lang.Object saListLock
-
tlsteList
private java.lang.ThreadLocal<java.util.ArrayList<java.util.Stack<TimerEvent>>> tlsteList
-
-
Constructor Detail
-
MultiThreadedStatsEventHandlerImpl
MultiThreadedStatsEventHandlerImpl(TimerFactory factory, java.lang.String name)
-
-
Method Detail
-
getSteElement
private java.util.Stack<TimerEvent> getSteElement(int id)
-
clear
public void clear()
Description copied from interface:StatsEventHandlerDiscard all accumulated statistics.- Specified by:
clearin interfaceStatsEventHandler- Overrides:
clearin classStatsEventHandlerBase
-
recordDuration
protected void recordDuration(int id, long duration)- Specified by:
recordDurationin classStatsEventHandlerBase
-
notify
public void notify(TimerEvent event)
-
-