Interface Flow
-
- All Superinterfaces:
LinkedListSetEntry<Flow,ThreadState>
- All Known Implementing Classes:
FlowImpl
public interface Flow extends LinkedListSetEntry<Flow,ThreadState>
Represents a sub-graph of theManagedFunctionContainergraph making up theThreadState. This enables knowing when to undertake theFlowCallbackon completion of allManagedFunctionContainerinstances of theFlow.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FunctionStatecancel()Cancels thisFlow.<E,F extends java.lang.Enum<F>,G extends java.lang.Enum<G>>
ManagedFunctionContainercreateAdministrationFunction(ManagedObjectAdministrationMetaData<E,F,G> adminMetaData, ManagedFunctionContainer parallelFunctionOwner)Creates a newManagedFunctionContainercontained in thisFlowfor theManagedObjectAdministrationMetaData.FunctionStatecreateFunction(FunctionLogic logic)<F extends java.lang.Enum<F>>
ManagedFunctionContainercreateGovernanceFunction(GovernanceActivity<F> governanceActivity, GovernanceMetaData<?,F> governanceMetaData)<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
ManagedFunctionContainercreateManagedFunction(java.lang.Object parameter, ManagedFunctionMetaData<O,F> managedFunctionMetaData, boolean isEnforceGovernance, BlockState parallelFunctionOwner)ThreadStategetThreadState()Obtains theThreadStatecontaining thisFlow.FunctionStatemanagedFunctionComplete(FunctionState function, java.lang.Throwable functionEscalation, EscalationCompletion escalationCompletion)Flags that the inputFunctionStatehas completed.-
Methods inherited from interface net.officefloor.frame.internal.structure.LinkedListSetEntry
getLinkedListSetOwner, getNext, getPrev, setNext, setPrev
-
-
-
-
Method Detail
-
createFunction
FunctionState createFunction(FunctionLogic logic)
- Parameters:
logic-FunctionLogic.- Returns:
FunctionStatefor theFunctionLogic.
-
createManagedFunction
<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>> ManagedFunctionContainer createManagedFunction(java.lang.Object parameter, ManagedFunctionMetaData<O,F> managedFunctionMetaData, boolean isEnforceGovernance, BlockState parallelFunctionOwner)
- Type Parameters:
O- Dependency key type.F-Flowkey type.- Parameters:
parameter- Parameter for theManagedFunction.managedFunctionMetaData-ManagedFunctionMetaDatafor the newManagedFunction.isEnforceGovernance-trueto enforceGovernanceon deactivation.parallelFunctionOwner-BlockStatethat is the parallel owner of the newManagedFunction.- Returns:
- New
ManagedFunctionContainer.
-
createGovernanceFunction
<F extends java.lang.Enum<F>> ManagedFunctionContainer createGovernanceFunction(GovernanceActivity<F> governanceActivity, GovernanceMetaData<?,F> governanceMetaData)
- Type Parameters:
F-Flowkey type.- Parameters:
governanceActivity-GovernanceActivity.governanceMetaData-GovernanceMetaData.- Returns:
- New
ManagedFunctionContainer.
-
createAdministrationFunction
<E,F extends java.lang.Enum<F>,G extends java.lang.Enum<G>> ManagedFunctionContainer createAdministrationFunction(ManagedObjectAdministrationMetaData<E,F,G> adminMetaData, ManagedFunctionContainer parallelFunctionOwner)
Creates a newManagedFunctionContainercontained in thisFlowfor theManagedObjectAdministrationMetaData.- Type Parameters:
E- Extension type.F-Flowkey type.G-Governancekey type.- Parameters:
adminMetaData-ManagedObjectAdministrationMetaData.parallelFunctionOwner-ManagedFunctionContainerthat is the parallel owner of the newManagedFunction.- Returns:
- New
ManagedFunctionContainer.
-
managedFunctionComplete
FunctionState managedFunctionComplete(FunctionState function, java.lang.Throwable functionEscalation, EscalationCompletion escalationCompletion)
Flags that the inputFunctionStatehas completed.- Parameters:
function-FunctionStatethat has completed.functionEscalation- PossibleEscalationfrom theFunctionState. May benull.escalationCompletion- PossibleEscalationCompletion. May benull.- Returns:
- Optional
FunctionStateto handle completion of theFunctionState.
-
cancel
FunctionState cancel()
Cancels thisFlow.- Returns:
FunctionStateto clean up thisFlow.
-
getThreadState
ThreadState getThreadState()
Obtains theThreadStatecontaining thisFlow.- Returns:
ThreadStatecontaining thisFlow.
-
-