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 TypeMethodDescriptionvoidclear()Discard the contents of the log.voiddisplay(PrintStream arg, String msg) Display the contents of this log in formatted form to the PrintStream.private voidinitData(int size, int increment) iterator()private voidlog(int id, long time) voidnotify(TimerEvent event) Methods inherited from interface 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:
iteratorin interfaceIterable<TimerEvent>
-
initData
private void initData(int size, int increment) -
notify
- Specified by:
notifyin interfaceTimerEventHandler
-
log
private void log(int id, long time) -
clear
public void clear()Description copied from interface:LogEventHandlerDiscard the contents of the log.- Specified by:
clearin interfaceLogEventHandler
-
display
Description copied from interface:LogEventHandlerDisplay the contents of this log in formatted form to the PrintStream.- Specified by:
displayin interfaceLogEventHandler
-