Top Inners Fields Constructors Methods
org.glassfish.pfl.tf.timer.impl

public Class LogEventHandlerImpl

extends NamedBase
implements LogEventHandler
Class Inheritance
All Implemented Interfaces
org.glassfish.pfl.tf.timer.spi.LogEventHandler, java.lang.Iterable, org.glassfish.pfl.tf.timer.spi.TimerEventHandler, org.glassfish.pfl.tf.timer.spi.Named
Imports
java.io.PrintStream, java.util.Iterator, .Stack, org.glassfish.pfl.tf.timer.spi.LogEventHandler, .NamedBase, .TimerEvent, .TimerFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private long[]
private static final int
private static final int
private static final String
private static final String
private int
private int
private int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public synchronized void
clear()

Implements org.glassfish.pfl.tf.timer.spi.LogEventHandler.clear.

Discard the contents of the log.

public void
display(PrintStream arg, String msg)

Implements org.glassfish.pfl.tf.timer.spi.LogEventHandler.display.

Display the contents of this log in formatted form to the PrintStream.

private void
initData(int size, int increment)

public synchronized Iterator<TimerEvent>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

private synchronized void
log(int id, long time)

public void
Inherited from org.glassfish.pfl.tf.timer.spi.NamedBase:
equalsfactoryhashCodenamesetFactorytoString

Field Detail

databack to summary
private long[] data
DEFAULT_INCREMENTback to summary
private static final int DEFAULT_INCREMENT
DEFAULT_SIZEback to summary
private static final int DEFAULT_SIZE
ENTER_REPback to summary
private static final String ENTER_REP
EXIT_REPback to summary
private static final String EXIT_REP
incrementback to summary
private int increment
nextFreeback to summary
private int nextFree
sizeback to summary
private int size

Constructor Detail

LogEventHandlerImplback to summary
pack-priv LogEventHandlerImpl(TimerFactory factory, String name)

Method Detail

clearback to summary
public synchronized void clear()

Implements org.glassfish.pfl.tf.timer.spi.LogEventHandler.clear.

Doc from org.glassfish.pfl.tf.timer.spi.LogEventHandler.clear.

Discard the contents of the log.

displayback to summary
public void display(PrintStream arg, String msg)

Implements org.glassfish.pfl.tf.timer.spi.LogEventHandler.display.

Doc from org.glassfish.pfl.tf.timer.spi.LogEventHandler.display.

Display the contents of this log in formatted form to the PrintStream.

initDataback to summary
private void initData(int size, int increment)
iteratorback to summary
public synchronized Iterator<TimerEvent> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

logback to summary
private synchronized void log(int id, long time)
notifyback to summary
public void notify(TimerEvent event)

Implements org.glassfish.pfl.tf.timer.spi.TimerEventHandler.notify.

org.glassfish.pfl.tf.timer.impl back to summary

private Class LogEventHandlerImpl.Indent

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
private String
private final int

Constructor Summary

AccessConstructor and Description
public
Indent(final int width)

Method Summary

Modifier and TypeMethod and Description
public void
in()

public void
out()

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

levelback to summary
private int level
repback to summary
private String rep
widthback to summary
private final int width

Constructor Detail

Indentback to summary
public Indent(final int width)

Method Detail

inback to summary
public void in()
outback to summary
public void out()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

updateback to summary
private void update()