Class ExecutionContextKeeper
- java.lang.Object
-
- org.palladiosimulator.simulizar.action.interpreter.ExecutionContextKeeper
-
public final class ExecutionContextKeeper extends Object
Utility class, realized as a singleton, to maintain associations betweenExecutionContext
s andSimuComSimProcess
es. More precisely, theExecutionContext
of anyAdaptationBehavior
that is executed asynchronously (i.e., one of itsAdaptationBehavior#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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExecutionContextKeeper
getInstance()
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 Detail
-
getInstance
public static ExecutionContextKeeper 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
.
-
-