Class AssetManagerImpl
- java.lang.Object
-
- net.officefloor.frame.impl.execute.linkedlistset.AbstractLinkedListSetEntry<FunctionState,Flow>
-
- net.officefloor.frame.impl.execute.asset.AssetManagerImpl
-
- All Implemented Interfaces:
AssetManager
,FunctionState
,LinkedListSetEntry<FunctionState,Flow>
public class AssetManagerImpl extends AbstractLinkedListSetEntry<FunctionState,Flow> implements AssetManager
AssetManager
implementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description AssetManagerImpl(ProcessState managingProcess, MonitorClock clock, FunctionLoop loop)
Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssetLatch
createAssetLatch(Asset asset)
Creates a newAssetLatch
.FunctionState
execute(FunctionStateContext context)
Executes theFunctionState
.ThreadState
getThreadState()
Obtains theThreadState
for thisFunctionState
.-
Methods inherited from class net.officefloor.frame.impl.execute.linkedlistset.AbstractLinkedListSetEntry
getNext, getPrev, setNext, setPrev
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.frame.internal.structure.FunctionState
cancel, getLinkedListSetOwner, getResponsibleTeam, handleEscalation, isRequireThreadStateSafety
-
Methods inherited from interface net.officefloor.frame.internal.structure.LinkedListSetEntry
getNext, getPrev, setNext, setPrev
-
-
-
-
Constructor Detail
-
AssetManagerImpl
public AssetManagerImpl(ProcessState managingProcess, MonitorClock clock, FunctionLoop loop)
Initiate.- Parameters:
managingProcess
-ProcessState
that is managing thisAssetManager
.clock
-MonitorClock
.loop
-FunctionLoop
.
-
-
Method Detail
-
createAssetLatch
public AssetLatch createAssetLatch(Asset asset)
Description copied from interface:AssetManager
Creates a new
AssetLatch
.The returned
AssetLatch
is not being managed by thisAssetManager
. To have theAssetLatch
managed, it must be registered with thisAssetManager
. This allows for only the list ofAssetLatch
instances requiring management to be managed.- Specified by:
createAssetLatch
in interfaceAssetManager
- Parameters:
asset
-Asset
thatFunctionState
instances will wait on.- Returns:
AssetLatch
for theAsset
.
-
getThreadState
public ThreadState getThreadState()
Description copied from interface:FunctionState
Obtains the
ThreadState
for thisFunctionState
.This provides access to the
ThreadState
that thisFunctionState
resides within.- Specified by:
getThreadState
in interfaceFunctionState
- Returns:
ThreadState
for thisFunctionState
.
-
execute
public FunctionState execute(FunctionStateContext context) throws java.lang.Throwable
Description copied from interface:FunctionState
Executes theFunctionState
.- Specified by:
execute
in interfaceFunctionState
- Parameters:
context
-FunctionStateContext
for executing theFunctionState
.- Returns:
- Next
FunctionState
to be executed. May benull
to indicate no furtherFunctionState
instances to execute. - Throws:
java.lang.Throwable
- Possible failure ofFunctionState
logic.
-
-