Top Inners Fields Constructors Methods
org.glassfish.pfl.basic.logex

public Class OperationTracer

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .List

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
pack-priv static interface
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static boolean
private static boolean
private static ThreadLocal<List<OperationTracer.Element>>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
begin(final String label)

Initialize operation tracing on the caller's thread.

public static void
public static String
public static void
public static void
private static void
end()

public static void
public static void
endReadValue()

Pop the record of the current value that was just read.

public static void
enter(final String name, final Object... args)

public static void
exit()

public static void
finish()

Terminate operation tracing on the caller's thread.

public static void
public static String

Returns:

The string.
getAsString
()

Return the current contents of the OperationTracer state for the current thread.

public static void
readingField(final String fieldName)

Update the current Value record to indicate the field currently being read.

public static void
readingIndex(final int index)

public static void
startReadArray(final String name, final int size)

public static void
startReadValue(final String name)

Push a record into the trace of the start of reading a value of the given type name.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

enabledback to summary
private static boolean enabled
frozenback to summary
private static boolean frozen
stateback to summary
private static ThreadLocal<List<OperationTracer.Element>> state

Constructor Detail

OperationTracerback to summary
private OperationTracer()

Method Detail

beginback to summary
public static void begin(final String label)

Initialize operation tracing on the caller's thread. The OperationTracer is initially empty.

clearback to summary
public static void clear()
convertToStringback to summary
public static String convertToString(Object arg)
disableback to summary
public static void disable()
enableback to summary
public static void enable()
endback to summary
private static void end()
endReadArrayback to summary
public static void endReadArray()
endReadValueback to summary
public static void endReadValue()

Pop the record of the current value that was just read.

enterback to summary
public static void enter(final String name, final Object... args)
exitback to summary
public static void exit()
finishback to summary
public static void finish()

Terminate operation tracing on the caller's thread. After this call, toString will return the empty string.

freezeback to summary
public static void freeze()
getAsStringback to summary
public static String getAsString()

Return the current contents of the OperationTracer state for the current thread.

Returns:String

The string.

readingFieldback to summary
public static void readingField(final String fieldName)

Update the current Value record to indicate the field currently being read.

readingIndexback to summary
public static void readingIndex(final int index)
startReadArrayback to summary
public static void startReadArray(final String name, final int size)
startReadValueback to summary
public static void startReadValue(final String name)

Push a record into the trace of the start of reading a value of the given type name.

org.glassfish.pfl.basic.logex back to summary

private Class OperationTracer.ArrayElement

extends Object
implements Element
Class Inheritance
All Implemented Interfaces
org.glassfish.pfl.basic.logex.OperationTracer.Element

Field Summary

Modifier and TypeField and Description
private String
private int
private int

Constructor Summary

AccessConstructor and Description
public
ArrayElement(final String componentName, final int size)

Method Summary

Modifier and TypeMethod and Description
public String
public void
setIndex(final int index)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

componentNameback to summary
private String componentName
indexback to summary
private int index
sizeback to summary
private int size

Constructor Detail

ArrayElementback to summary
public ArrayElement(final String componentName, final int size)

Method Detail

getAsStringback to summary
public String getAsString()

Implements org.glassfish.pfl.basic.logex.OperationTracer.Element.getAsString.

Annotations
@Override
setIndexback to summary
public void setIndex(final int index)
org.glassfish.pfl.basic.logex back to summary

pack-priv Interface OperationTracer.Element

Known Direct Implementers
org.glassfish.pfl.basic.logex.OperationTracer.ArrayElement, org.glassfish.pfl.basic.logex.OperationTracer.ValueElement, org.glassfish.pfl.basic.logex.OperationTracer.GenericElement

Method Summary

Modifier and TypeMethod and Description
public String

Method Detail

getAsStringback to summary
public String getAsString()
org.glassfish.pfl.basic.logex back to summary

private Class OperationTracer.GenericElement

extends Object
implements Element
Class Inheritance
All Implemented Interfaces
org.glassfish.pfl.basic.logex.OperationTracer.Element

Field Summary

Modifier and TypeField and Description
private Object[]
private String

Constructor Summary

AccessConstructor and Description
public
GenericElement(final String name, final Object[] data)

Method Summary

Modifier and TypeMethod and Description
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

databack to summary
private Object[] data
nameback to summary
private String name

Constructor Detail

GenericElementback to summary
public GenericElement(final String name, final Object[] data)

Method Detail

getAsStringback to summary
public String getAsString()

Implements org.glassfish.pfl.basic.logex.OperationTracer.Element.getAsString.

Annotations
@Override
org.glassfish.pfl.basic.logex back to summary

private Class OperationTracer.ValueElement

extends Object
implements Element
Class Inheritance
All Implemented Interfaces
org.glassfish.pfl.basic.logex.OperationTracer.Element

Field Summary

Modifier and TypeField and Description
private String
private String

Constructor Summary

AccessConstructor and Description
public
ValueElement(final String valueName)

Method Summary

Modifier and TypeMethod and Description
public String
public void
setFieldName(final String fieldName)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fieldNameback to summary
private String fieldName
valueNameback to summary
private String valueName

Constructor Detail

ValueElementback to summary
public ValueElement(final String valueName)

Method Detail

getAsStringback to summary
public String getAsString()

Implements org.glassfish.pfl.basic.logex.OperationTracer.Element.getAsString.

Annotations
@Override
setFieldNameback to summary
public void setFieldName(final String fieldName)