Interface FunctionState
- All Superinterfaces:
LinkedListSetEntry<FunctionState,Flow>
- All Known Subinterfaces:
AssetManager,BlockState,ManagedFunctionContainer,RegisteredGovernance,ThreadProfiler
- All Known Implementing Classes:
AbstractDelegateFunctionState,AbstractFunctionState,AssetManagerImpl,LinkedListSetPromise,ManagedFunctionContainerImpl,ThreadProfilerImpl
Node within the graph of
FunctionState instances to execute.- Author:
- Daniel Sagenschneider
-
Method Summary
Modifier and TypeMethodDescriptiondefault FunctionStatecancel()execute(FunctionStateContext context) Executes theFunctionState.default FlowObtains the owner of theLinkedListSetthat thisLinkedListSetEntrymay be added.default TeamManagementObtains theTeamManagementresponsible for thisFunctionState.Obtains theThreadStatefor thisFunctionState.default FunctionStatehandleEscalation(Throwable escalation, EscalationCompletion completion) HandlesEscalationfrom theManagedFunction.default booleanIndicates if theFunctionStaterequiresThreadStatesafety.Methods inherited from interface net.officefloor.frame.internal.structure.LinkedListSetEntry
getNext, getPrev, setNext, setPrev
-
Method Details
-
getLinkedListSetOwner
Description copied from interface:LinkedListSetEntryObtains the owner of the
LinkedListSetthat thisLinkedListSetEntrymay be added.LinkedListSetEntryinstances may only be added to theLinkedListSetthey were intended for and can not be shared betweenLinkedListSetinstances. This constraint:- ensures the integrity of the
FunctionState,Flow,ThreadState,ProcessStatestructure, and - improves uniqueness performance as
LinkedListSetEntry.getNext()andLinkedListSetEntry.getPrev()both returningnullindicates not added
- Specified by:
getLinkedListSetOwnerin interfaceLinkedListSetEntry<FunctionState,Flow> - Returns:
- Owner of the
LinkedListSetthat may contain thisLinkedListSetEntry.
- ensures the integrity of the
-
getResponsibleTeam
Obtains the
TeamManagementresponsible for thisFunctionState.By default,
FunctionStatemay be executed by anyTeamManagement.- Returns:
TeamManagementresponsible for thisFunctionState. May benullto indicate anyTeammay execute theFunctionState.
-
getThreadState
ThreadState getThreadState()Obtains the
ThreadStatefor thisFunctionState.This provides access to the
ThreadStatethat thisFunctionStateresides within.- Returns:
ThreadStatefor thisFunctionState.
-
isRequireThreadStateSafety
default boolean isRequireThreadStateSafety()Indicates if theFunctionStaterequiresThreadStatesafety.- Returns:
trueshouldFunctionStaterequireThreadStatesafety.
-
execute
Executes theFunctionState.- Parameters:
context-FunctionStateContextfor executing theFunctionState.- Returns:
- Next
FunctionStateto be executed. May benullto indicate no furtherFunctionStateinstances to execute. - Throws:
Throwable- Possible failure ofFunctionStatelogic.
-
cancel
- Returns:
- Optional clean up
FunctionState. May benull.
-
handleEscalation
HandlesEscalationfrom theManagedFunction.- Parameters:
escalation-Escalation.completion- OptionalEscalationCompletionto be notified onceEscalationhas been handled.- Returns:
- Optional
FunctionStateto handle theEscalation.
-