Class ExecutionContextKeeper
java.lang.Object
org.palladiosimulator.simulizar.action.interpreter.ExecutionContextKeeper
Utility class, realized as a singleton, to maintain associations between
ExecutionContext
s and SimuComSimProcesses. 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 ExecutionContextKeeperGets the sole instance of this class.Optional<de.uka.ipd.sdq.simucomframework.core.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
ExecutionContextKeeperinstance.
-
getProcessForContext
public Optional<de.uka.ipd.sdq.simucomframework.core.SimuComSimProcess> getProcessForContext(ExecutionContext context) Gets the simulation process that is associated with the given context.- Parameters:
context- AnExecutionContextinstance.- Returns:
- A (potentially empty)
Optionalthat holds the foundSimuComSimProcess. - Throws:
NullPointerException- In casecontext == null.
-