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
- MaximumPromise
chain length.breakChainTeamManagement
- Break chainTeamManagement
.functionLoop
-FunctionLoop
.
-
-
Method Detail
-
getProcessIdentifier
public java.lang.Object getProcessIdentifier()
Description copied from interface:ProcessState
Obtains the identifier for thisProcessState
.- Specified by:
getProcessIdentifier
in interfaceProcessState
- Returns:
- Identifier for this
ProcessState
.
-
getMainThreadState
public ThreadState getMainThreadState()
Description copied from interface:ProcessState
Obtains the main
ThreadState
for thisProcessState
.The main
ThreadState
is used for anyProcessState
mutations. This avoids the possibility of data corruption, as only oneThreadState
may alter theProcessState
.- Specified by:
getMainThreadState
in interfaceProcessState
- Returns:
- Main
ThreadState
for thisProcessState
.
-
isCancelled
public boolean isCancelled()
Description copied from interface:ProcessState
Indicates if the
ProcessState
has been cancelled.This is only valid after synchronising with this
ProcessState
(in other words the mainThreadState
).- Specified by:
isCancelled
in interfaceProcessState
- Returns:
true
if cancelled - or indeterminate if have not synchronised onProcessState
.
-
getProcessManager
public ProcessManager getProcessManager()
Description copied from interface:ProcessState
Obtains theProcessManager
for thisProcessState
.- Specified by:
getProcessManager
in interfaceProcessState
- Returns:
ProcessManager
for thisProcessState
.
-
spawnThreadState
public FunctionState spawnThreadState(ManagedFunctionMetaData<?,?> managedFunctionMetaData, java.lang.Object parameter, FlowCompletion completion, boolean isEscalationHandlingThreadState)
Description copied from interface:ProcessState
Spawns a newThreadState
contained in thisProcessState
.- Specified by:
spawnThreadState
in interfaceProcessState
- Parameters:
managedFunctionMetaData
-ManagedFunctionMetaData
of the initialManagedFunction
within the spawnedThreadState
.parameter
- Parameter for the initialManagedFunction
.completion
- OptionalFlowCompletion
to be notified of completion of the spawnedThreadState
.isEscalationHandlingThreadState
- Indicates whether theThreadState
is forEscalation
handling.- Returns:
FunctionState
to spawn theThreadState
.
-
threadComplete
public FunctionState threadComplete(ThreadState thread, FunctionState threadCompletion)
Description copied from interface:ProcessState
Flags that the inputThreadState
has complete.- Specified by:
threadComplete
in interfaceProcessState
- Parameters:
thread
-ThreadState
that has completed.threadCompletion
- OptionalFunctionState
for the completion of theThreadState
. May benull
.- Returns:
FunctionState
to complete theThreadState
.
-
getManagedObjectContainer
public ManagedObjectContainer getManagedObjectContainer(int index)
Description copied from interface:ProcessState
Obtains theManagedObjectContainer
for the input index.- Specified by:
getManagedObjectContainer
in interfaceProcessState
- Parameters:
index
- Index of theManagedObjectContainer
to be returned.- Returns:
ManagedObjectContainer
for the index.
-
getManagedObjectCleanup
public ManagedObjectCleanup getManagedObjectCleanup()
Description copied from interface:ProcessState
Obtains theManagedObjectCleanup
for thisProcessState
.- Specified by:
getManagedObjectCleanup
in interfaceProcessState
- Returns:
ManagedObjectCleanup
for thisProcessState
.
-
getFunctionLoop
public FunctionLoop getFunctionLoop()
Description copied from interface:ProcessState
Obtains theFunctionLoop
for theProcessState
.- Specified by:
getFunctionLoop
in interfaceProcessState
- Returns:
FunctionLoop
for theProcessState
.
-
-