Package de.uka.ipd.sdq.simucomframework
Class Context
- java.lang.Object
-
- de.uka.ipd.sdq.simucomframework.variables.StackContext
-
- de.uka.ipd.sdq.simucomframework.Context
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ForkContext
public abstract class Context extends StackContext
Context of each simulation thread. This context inherits a stack context and enriches it with information on the simulated execution environment.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.uka.ipd.sdq.simucomframework.variables.StackContext
stack
-
-
Constructor Summary
Constructors Constructor Description Context(SimuComModel myModel)Initialise a new context for the given simulation model
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description SimulatedLinkingResourceContainerfindLinkingResource(String linkingResourceContainerID)Lookup method to find the linking resource container that belongs to the given container id.AbstractSimulatedResourceContainerfindResource(String assemblyContextID)Lookup method to find the resource container in which the given components assembly context is deployedSimuComModelgetModel()de.uka.ipd.sdq.scheduler.IPassiveResourcegetPassiveRessourceInContext(String resourceURI, org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext, AbstractSimulatedResourceContainer resourceContainer, long capacity)longgetSessionId()SimuComSimProcessgetThread()protected abstract voidinitialiseAssemblyContextLookup()Template method to be filled in by the generator.protected voidlinkAssemblyContextAndResourceContainer(String assemblyContextID, String resourceContainerID)Create a deployment relationship between the given assembly context and the given resource containervoidsetSimProcess(SimuComSimProcess process)-
Methods inherited from class de.uka.ipd.sdq.simucomframework.variables.StackContext
evaluate, evaluate, evaluate, evaluateInner, evaluateStatic, evaluateStatic, evaluateStatic, evaluateStatic, evaluateStatic, evaluateStatic, getEvaluationMode, getStack, setEvaluationMode
-
-
-
-
Constructor Detail
-
Context
public Context(SimuComModel myModel)
Initialise a new context for the given simulation model- Parameters:
myModel- The simulation model used in this context
-
-
Method Detail
-
getSessionId
public long getSessionId()
-
findResource
public AbstractSimulatedResourceContainer findResource(String assemblyContextID)
Lookup method to find the resource container in which the given components assembly context is deployed- Parameters:
assemblyContextID- The ID of the assembly context for which its deployment is queried- Returns:
- The resource container in which the given assembly context is deployed
-
findLinkingResource
public SimulatedLinkingResourceContainer findLinkingResource(String linkingResourceContainerID)
Lookup method to find the linking resource container that belongs to the given container id.- Parameters:
linkingResourceContainerID- the container id- Returns:
- the linking resource container
-
linkAssemblyContextAndResourceContainer
protected void linkAssemblyContextAndResourceContainer(String assemblyContextID, String resourceContainerID)
Create a deployment relationship between the given assembly context and the given resource container- Parameters:
assemblyContextID- ID of the assembly context to allocateresourceContainerID- ID of the resource container on which the assembly context is allocated
-
getPassiveRessourceInContext
public de.uka.ipd.sdq.scheduler.IPassiveResource getPassiveRessourceInContext(String resourceURI, org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext, AbstractSimulatedResourceContainer resourceContainer, long capacity)
-
initialiseAssemblyContextLookup
protected abstract void initialiseAssemblyContextLookup()
Template method to be filled in by the generator. Calles linkAssemblyContextAndResourceContainer to create the deployment specified in the allocation model
-
getThread
public SimuComSimProcess getThread()
-
setSimProcess
public void setSimProcess(SimuComSimProcess process)
-
getModel
public SimuComModel getModel()
-
-