Class OfficeManagerProcessState
- java.lang.Object
-
- net.officefloor.frame.impl.execute.office.OfficeManagerProcessState
-
- All Implemented Interfaces:
ProcessState
public class OfficeManagerProcessState extends java.lang.Object implements ProcessState
- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description OfficeManagerProcessState(int maximumFunctionChainLength, TeamManagement breakChainTeamManagement, FunctionLoop functionLoop)Instantiate.
-
Method Summary
-
-
-
Constructor Detail
-
OfficeManagerProcessState
public OfficeManagerProcessState(int maximumFunctionChainLength, TeamManagement breakChainTeamManagement, FunctionLoop functionLoop)Instantiate.- Parameters:
maximumFunctionChainLength- MaximumPromisechain length.breakChainTeamManagement- Break chainTeamManagement.functionLoop-FunctionLoop.
-
-
Method Detail
-
getProcessIdentifier
public java.lang.Object getProcessIdentifier()
Description copied from interface:ProcessStateObtains the identifier for thisProcessState.- Specified by:
getProcessIdentifierin interfaceProcessState- Returns:
- Identifier for this
ProcessState.
-
getMainThreadState
public ThreadState getMainThreadState()
Description copied from interface:ProcessStateObtains the main
ThreadStatefor thisProcessState.The main
ThreadStateis used for anyProcessStatemutations. This avoids the possibility of data corruption, as only oneThreadStatemay alter theProcessState.- Specified by:
getMainThreadStatein interfaceProcessState- Returns:
- Main
ThreadStatefor thisProcessState.
-
isCancelled
public boolean isCancelled()
Description copied from interface:ProcessStateIndicates if the
ProcessStatehas been cancelled.This is only valid after synchronising with this
ProcessState(in other words the mainThreadState).- Specified by:
isCancelledin interfaceProcessState- Returns:
trueif cancelled - or indeterminate if have not synchronised onProcessState.
-
getProcessManager
public ProcessManager getProcessManager()
Description copied from interface:ProcessStateObtains theProcessManagerfor thisProcessState.- Specified by:
getProcessManagerin interfaceProcessState- Returns:
ProcessManagerfor thisProcessState.
-
spawnThreadState
public FunctionState spawnThreadState(ManagedFunctionMetaData<?,?> managedFunctionMetaData, java.lang.Object parameter, FlowCompletion completion, boolean isEscalationHandlingThreadState)
Description copied from interface:ProcessStateSpawns a newThreadStatecontained in thisProcessState.- Specified by:
spawnThreadStatein interfaceProcessState- Parameters:
managedFunctionMetaData-ManagedFunctionMetaDataof the initialManagedFunctionwithin the spawnedThreadState.parameter- Parameter for the initialManagedFunction.completion- OptionalFlowCompletionto be notified of completion of the spawnedThreadState.isEscalationHandlingThreadState- Indicates whether theThreadStateis forEscalationhandling.- Returns:
FunctionStateto spawn theThreadState.
-
threadComplete
public FunctionState threadComplete(ThreadState thread, FunctionState threadCompletion)
Description copied from interface:ProcessStateFlags that the inputThreadStatehas complete.- Specified by:
threadCompletein interfaceProcessState- Parameters:
thread-ThreadStatethat has completed.threadCompletion- OptionalFunctionStatefor the completion of theThreadState. May benull.- Returns:
FunctionStateto complete theThreadState.
-
getManagedObjectContainer
public ManagedObjectContainer getManagedObjectContainer(int index)
Description copied from interface:ProcessStateObtains theManagedObjectContainerfor the input index.- Specified by:
getManagedObjectContainerin interfaceProcessState- Parameters:
index- Index of theManagedObjectContainerto be returned.- Returns:
ManagedObjectContainerfor the index.
-
getManagedObjectCleanup
public ManagedObjectCleanup getManagedObjectCleanup()
Description copied from interface:ProcessStateObtains theManagedObjectCleanupfor thisProcessState.- Specified by:
getManagedObjectCleanupin interfaceProcessState- Returns:
ManagedObjectCleanupfor thisProcessState.
-
getFunctionLoop
public FunctionLoop getFunctionLoop()
Description copied from interface:ProcessStateObtains theFunctionLoopfor theProcessState.- Specified by:
getFunctionLoopin interfaceProcessState- Returns:
FunctionLoopfor theProcessState.
-
-