Interface Flow
-
- All Superinterfaces:
LinkedListSetEntry<Flow,ThreadState>
- All Known Implementing Classes:
FlowImpl
public interface Flow extends LinkedListSetEntry<Flow,ThreadState>
Represents a sub-graph of theManagedFunctionContainer
graph making up theThreadState
. This enables knowing when to undertake theFlowCallback
on completion of allManagedFunctionContainer
instances of theFlow
.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FunctionState
cancel()
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 newManagedFunctionContainer
contained in thisFlow
for theManagedObjectAdministrationMetaData
.FunctionState
createFunction(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)
ThreadState
getThreadState()
Obtains theThreadState
containing thisFlow
.FunctionState
managedFunctionComplete(FunctionState function, java.lang.Throwable functionEscalation, EscalationCompletion escalationCompletion)
Flags that the inputFunctionState
has 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:
FunctionState
for 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
-Flow
key type.- Parameters:
parameter
- Parameter for theManagedFunction
.managedFunctionMetaData
-ManagedFunctionMetaData
for the newManagedFunction
.isEnforceGovernance
-true
to enforceGovernance
on deactivation.parallelFunctionOwner
-BlockState
that 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
-Flow
key 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 newManagedFunctionContainer
contained in thisFlow
for theManagedObjectAdministrationMetaData
.- Type Parameters:
E
- Extension type.F
-Flow
key type.G
-Governance
key type.- Parameters:
adminMetaData
-ManagedObjectAdministrationMetaData
.parallelFunctionOwner
-ManagedFunctionContainer
that is the parallel owner of the newManagedFunction
.- Returns:
- New
ManagedFunctionContainer
.
-
managedFunctionComplete
FunctionState managedFunctionComplete(FunctionState function, java.lang.Throwable functionEscalation, EscalationCompletion escalationCompletion)
Flags that the inputFunctionState
has completed.- Parameters:
function
-FunctionState
that has completed.functionEscalation
- PossibleEscalation
from theFunctionState
. May benull
.escalationCompletion
- PossibleEscalationCompletion
. May benull
.- Returns:
- Optional
FunctionState
to handle completion of theFunctionState
.
-
cancel
FunctionState cancel()
Cancels thisFlow
.- Returns:
FunctionState
to clean up thisFlow
.
-
getThreadState
ThreadState getThreadState()
Obtains theThreadState
containing thisFlow
.- Returns:
ThreadState
containing thisFlow
.
-
-