Package org.glassfish.pfl.tf.timer.impl
Class LogEventHandlerImpl
java.lang.Object
org.glassfish.pfl.tf.timer.spi.NamedBase
org.glassfish.pfl.tf.timer.impl.LogEventHandlerImpl
- All Implemented Interfaces:
Iterable<TimerEvent>
,LogEventHandler
,Named
,TimerEventHandler
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Discard the contents of the log.void
display
(PrintStream arg, String msg) Display the contents of this log in formatted form to the PrintStream.private void
initData
(int size, int increment) iterator()
private void
log
(int id, long time) void
notify
(TimerEvent event) 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 java.lang.Iterable
forEach, spliterator
-
Field Details
-
DEFAULT_SIZE
private static final int DEFAULT_SIZE- See Also:
-
DEFAULT_INCREMENT
private static final int DEFAULT_INCREMENT- See Also:
-
data
private long[] data -
size
private int size -
increment
private int increment -
nextFree
private int nextFree -
ENTER_REP
- See Also:
-
EXIT_REP
- See Also:
-
-
Constructor Details
-
LogEventHandlerImpl
LogEventHandlerImpl(TimerFactory factory, String name)
-
-
Method Details
-
iterator
- Specified by:
iterator
in interfaceIterable<TimerEvent>
-
initData
private void initData(int size, int increment) -
notify
- Specified by:
notify
in interfaceTimerEventHandler
-
log
private void log(int id, long time) -
clear
public void clear()Description copied from interface:LogEventHandler
Discard the contents of the log.- Specified by:
clear
in interfaceLogEventHandler
-
display
Description copied from interface:LogEventHandler
Display the contents of this log in formatted form to the PrintStream.- Specified by:
display
in interfaceLogEventHandler
-