Class ExecutionContextKeeper
java.lang.Object
org.palladiosimulator.simulizar.action.interpreter.ExecutionContextKeeper
Utility class, realized as a singleton, to maintain associations between
ExecutionContext
s and SimuComSimProcess
es. More precisely, the ExecutionContext
of any
AdaptationBehavior
that is executed asynchronously (i.e., one of its
AdaptationBehavior#executeAsync(org.palladiosimulator.simulizar.action.instance.RoleSet)
methods has been called) is maintained here together with the simulation processed which executes
the behavior.-
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutionContextKeeper
Gets the sole instance of this class.Optional<de.uka.ipd.sdq.simucomframework.SimuComSimProcess>
getProcessForContext
(ExecutionContext context) Gets the simulation process that is associated with the given context.
-
Method Details
-
getInstance
Gets the sole instance of this class.- Returns:
- The sole
ExecutionContextKeeper
instance.
-
getProcessForContext
public Optional<de.uka.ipd.sdq.simucomframework.SimuComSimProcess> getProcessForContext(ExecutionContext context) Gets the simulation process that is associated with the given context.- Parameters:
context
- AnExecutionContext
instance.- Returns:
- A (potentially empty)
Optional
that holds the foundSimuComSimProcess
. - Throws:
NullPointerException
- In casecontext == null
.
-