Interface ProcessState
-
- All Known Implementing Classes:
OfficeManagerProcessState,ProcessStateImpl
public interface ProcessStateState of a process within the
Office.ProcessStateinstances can not interact with each other, much like processes within an Operating System can not directly interact (e.g. share process space) with each other.- Author:
- Daniel Sagenschneider
-
-
Method Summary
-
-
-
Method Detail
-
getProcessIdentifier
java.lang.Object getProcessIdentifier()
Obtains the identifier for thisProcessState.- Returns:
- Identifier for this
ProcessState.
-
getProcessManager
ProcessManager getProcessManager()
Obtains theProcessManagerfor thisProcessState.- Returns:
ProcessManagerfor thisProcessState.
-
isCancelled
boolean isCancelled()
Indicates if the
ProcessStatehas been cancelled.This is only valid after synchronising with this
ProcessState(in other words the mainThreadState).- Returns:
trueif cancelled - or indeterminate if have not synchronised onProcessState.
-
getMainThreadState
ThreadState getMainThreadState()
Obtains the main
ThreadStatefor thisProcessState.The main
ThreadStateis used for anyProcessStatemutations. This avoids the possibility of data corruption, as only oneThreadStatemay alter theProcessState.- Returns:
- Main
ThreadStatefor thisProcessState.
-
spawnThreadState
FunctionState spawnThreadState(ManagedFunctionMetaData<?,?> managedFunctionMetaData, java.lang.Object parameter, FlowCompletion completion, boolean isEscalationHandlingThreadState)
Spawns a newThreadStatecontained in thisProcessState.- 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
FunctionState threadComplete(ThreadState thread, FunctionState threadCompletion)
Flags that the inputThreadStatehas complete.- Parameters:
thread-ThreadStatethat has completed.threadCompletion- OptionalFunctionStatefor the completion of theThreadState. May benull.- Returns:
FunctionStateto complete theThreadState.
-
getFunctionLoop
FunctionLoop getFunctionLoop()
Obtains theFunctionLoopfor theProcessState.- Returns:
FunctionLoopfor theProcessState.
-
getManagedObjectContainer
ManagedObjectContainer getManagedObjectContainer(int index)
Obtains theManagedObjectContainerfor the input index.- Parameters:
index- Index of theManagedObjectContainerto be returned.- Returns:
ManagedObjectContainerfor the index.
-
getManagedObjectCleanup
ManagedObjectCleanup getManagedObjectCleanup()
Obtains theManagedObjectCleanupfor thisProcessState.- Returns:
ManagedObjectCleanupfor thisProcessState.
-
-