Package kieker.monitoring.core.registry
Enum Class ControlFlowRegistry
- All Implemented Interfaces:
Serializable,Comparable<ControlFlowRegistry>,Constable
- Since:
- 1.3
- Author:
- Andre van Hoorn, Jan Waller
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionfinal longThis method returns a thread-local traceid which is globally unique and stored it local for the thread.final longThis methods returns a globally unique trace id.final intSince this method accesses a ThreadLocal variable, it is not (necessary to be) thread-safe.final intSince this method accesses a ThreadLocal variable, it is not (necessary to be) thread-safe.final intThis method returns the thread-local curEoi previously registered using the method registerTraceId(curTraceId).final intThis method returns the thread-local curEss previously registered using the method registerTraceId(curTraceId).final longThis method returns the thread-local traceid previously registered using the method registerTraceId(curTraceId).final voidstoreThreadLocalEOI(int eoi) Used to explicitly register an curEoi.final voidstoreThreadLocalESS(int ess) Used to explicitly register a execution stack size (ess) value.final voidstoreThreadLocalTraceId(long traceId) This method stores a thread-local curTraceId.final voidThis method unsets a previously registered traceid.final voidThis method unsets a previously registered curEss.final voidThis method unsets a previously registered traceid.static ControlFlowRegistryReturns the enum constant of this class with the specified name.static ControlFlowRegistry[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getUniqueTraceId
public final long getUniqueTraceId()This methods returns a globally unique trace id.- Returns:
- a globally unique trace id.
-
getAndStoreUniqueThreadLocalTraceId
public final long getAndStoreUniqueThreadLocalTraceId()This method returns a thread-local traceid which is globally unique and stored it local for the thread. The thread is responsible for invalidating the stored curTraceId using the method unsetThreadLocalTraceId()!- Returns:
- A unique trace ID.
-
storeThreadLocalTraceId
public final void storeThreadLocalTraceId(long traceId) This method stores a thread-local curTraceId. The thread is responsible for invalidating the stored curTraceId using the method unsetThreadLocalTraceId()!- Parameters:
traceId- The trace ID to store in a thread-local way.
-
recallThreadLocalTraceId
public final long recallThreadLocalTraceId()This method returns the thread-local traceid previously registered using the method registerTraceId(curTraceId).- Returns:
- the traceid. -1 if no curTraceId has been registered for this thread.
-
unsetThreadLocalTraceId
public final void unsetThreadLocalTraceId()This method unsets a previously registered traceid. -
storeThreadLocalEOI
public final void storeThreadLocalEOI(int eoi) Used to explicitly register an curEoi. The thread is responsible for invalidating the stored curTraceId using the method unsetThreadLocalEOI()!- Parameters:
eoi- The execution order index to register.
-
incrementAndRecallThreadLocalEOI
public final int incrementAndRecallThreadLocalEOI()Since this method accesses a ThreadLocal variable, it is not (necessary to be) thread-safe.- Returns:
- Increments the thread local execution order index and returns it.
-
recallThreadLocalEOI
public final int recallThreadLocalEOI()This method returns the thread-local curEoi previously registered using the method registerTraceId(curTraceId).- Returns:
- the sessionid. -1 if no curEoi registered.
-
unsetThreadLocalEOI
public final void unsetThreadLocalEOI()This method unsets a previously registered traceid. -
storeThreadLocalESS
public final void storeThreadLocalESS(int ess) Used to explicitly register a execution stack size (ess) value. The thread is responsible for invalidating the stored value using the methodunsetThreadLocalESS()!- Parameters:
ess- The execution stack size to store.
-
recallAndIncrementThreadLocalESS
public final int recallAndIncrementThreadLocalESS()Since this method accesses a ThreadLocal variable, it is not (necessary to be) thread-safe.- Returns:
- The current execution stack size, before the incrementation.
-
recallThreadLocalESS
public final int recallThreadLocalESS()This method returns the thread-local curEss previously registered using the method registerTraceId(curTraceId).- Returns:
- the sessionid. -1 if no curEss registered.
-
unsetThreadLocalESS
public final void unsetThreadLocalESS()This method unsets a previously registered curEss.
-