Class ThreadProfilerImpl
- java.lang.Object
-
- net.officefloor.frame.impl.execute.linkedlistset.AbstractLinkedListSetEntry<FunctionState,Flow>
-
- net.officefloor.frame.impl.execute.profile.ThreadProfilerImpl
-
- All Implemented Interfaces:
ProfiledThreadState
,FunctionState
,LinkedListSetEntry<FunctionState,Flow>
,ThreadProfiler
public class ThreadProfilerImpl extends AbstractLinkedListSetEntry<FunctionState,Flow> implements ThreadProfiler, ProfiledThreadState
ThreadProfiler
implementation.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FunctionState
execute(FunctionStateContext context)
Executes theFunctionState
.java.util.List<ProfiledManagedFunction>
getProfiledManagedFunctions()
Obtains theProfiledManagedFunction
instances.long
getStartTimestampMilliseconds()
Obtains the start time stamp.long
getStartTimestampNanoseconds()
Obtains the start time stamp.ThreadState
getThreadState()
Obtains theThreadState
for thisFunctionState
.void
profileManagedFunction(ManagedFunctionLogicMetaData functionMetaData)
Profiles execution of aManagedFunction
.-
Methods inherited from class net.officefloor.frame.impl.execute.linkedlistset.AbstractLinkedListSetEntry
getNext, getPrev, setNext, setPrev
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.frame.internal.structure.FunctionState
cancel, getLinkedListSetOwner, getResponsibleTeam, handleEscalation, isRequireThreadStateSafety
-
Methods inherited from interface net.officefloor.frame.internal.structure.LinkedListSetEntry
getNext, getPrev, setNext, setPrev
-
-
-
-
Method Detail
-
profileManagedFunction
public void profileManagedFunction(ManagedFunctionLogicMetaData functionMetaData)
Description copied from interface:ThreadProfiler
Profiles execution of aManagedFunction
.- Specified by:
profileManagedFunction
in interfaceThreadProfiler
- Parameters:
functionMetaData
-ManagedFunctionLogicMetaData
of theManagedFunction
being executed.
-
getThreadState
public ThreadState getThreadState()
Description copied from interface:FunctionState
Obtains the
ThreadState
for thisFunctionState
.This provides access to the
ThreadState
that thisFunctionState
resides within.- Specified by:
getThreadState
in interfaceFunctionState
- Returns:
ThreadState
for thisFunctionState
.
-
execute
public FunctionState execute(FunctionStateContext context) throws java.lang.Throwable
Description copied from interface:FunctionState
Executes theFunctionState
.- Specified by:
execute
in interfaceFunctionState
- Parameters:
context
-FunctionStateContext
for executing theFunctionState
.- Returns:
- Next
FunctionState
to be executed. May benull
to indicate no furtherFunctionState
instances to execute. - Throws:
java.lang.Throwable
- Possible failure ofFunctionState
logic.
-
getStartTimestampMilliseconds
public long getStartTimestampMilliseconds()
Description copied from interface:ProfiledThreadState
Obtains the start time stamp.- Specified by:
getStartTimestampMilliseconds
in interfaceProfiledThreadState
- Returns:
- Start time stamp in milliseconds.
-
getStartTimestampNanoseconds
public long getStartTimestampNanoseconds()
Description copied from interface:ProfiledThreadState
Obtains the start time stamp.- Specified by:
getStartTimestampNanoseconds
in interfaceProfiledThreadState
- Returns:
- Start time stamp in nanoseconds.
-
getProfiledManagedFunctions
public java.util.List<ProfiledManagedFunction> getProfiledManagedFunctions()
Description copied from interface:ProfiledThreadState
Obtains theProfiledManagedFunction
instances.- Specified by:
getProfiledManagedFunctions
in interfaceProfiledThreadState
- Returns:
ProfiledManagedFunction
instances.
-
-