Class SimulatedResourceContainer
- java.lang.Object
-
- de.uka.ipd.sdq.simucomframework.resources.AbstractSimulatedResourceContainer
-
- de.uka.ipd.sdq.simucomframework.resources.SimulatedResourceContainer
-
public class SimulatedResourceContainer extends AbstractSimulatedResourceContainer
TODO Get rid of heavy argument passing. Model elements are often enough as they contain information like ID and name. [Lehrig] TODO Find original author ;)
-
-
Field Summary
-
Fields inherited from class de.uka.ipd.sdq.simucomframework.resources.AbstractSimulatedResourceContainer
activeResourceProvidedInterfaces, activeResources, LOGGER, myContainerID, myModel
-
-
Constructor Summary
Constructors Modifier Constructor Description SimulatedResourceContainer(SimuComModel myModel, String containerID)protectedSimulatedResourceContainer(SimuComModel myModel, String containerID, List<SimulatedResourceContainer> nestedContainer, SimulatedResourceContainer parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddActiveResource(org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification activeResource, String[] providedInterfaceIds, String resourceContainerID, String schedulingStrategyID)ScheduledResourceaddActiveResourceWithoutCalculators(org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification activeResource, String[] providedInterfaceIds, String resourceContainerID, String schedulingStrategyID)voidaddNestedResourceContainer(String nestedResourceContainerId)de.uka.ipd.sdq.scheduler.IPassiveResourcecreatePassiveResource(org.palladiosimulator.pcm.repository.PassiveResource resource, org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext, long capacity)List<SimulatedResourceContainer>getNestedResourceContainers()SimulatedResourceContainergetParentResourceContainer()voidloadActiveResource(SimuComSimProcess requestingProcess, String typeID, double demand)Demand processing of a resource demand by a given type of active resources.voidloadActiveResource(SimuComSimProcess requestingProcess, String providedInterfaceID, int resourceServiceID, double demand)Demand processing of a resource demand by a given type of active resource and a resource interface operation.voidloadActiveResource(SimuComSimProcess requestingProcess, String providedInterfaceID, int resourceServiceID, Map<String,Serializable> parameterMap, double demand)Demand processing of a resource demand by a given type of active resource and a resource interface operation and additional parameters which can be used in an active resourcevoidsetParentResourceContainer(String parentResourceContainerId)-
Methods inherited from class de.uka.ipd.sdq.simucomframework.resources.AbstractSimulatedResourceContainer
getActiveResources, getAllActiveResources, getFailedResources, getResourceContainerID, loadActiveResource
-
-
-
-
Constructor Detail
-
SimulatedResourceContainer
public SimulatedResourceContainer(SimuComModel myModel, String containerID)
-
SimulatedResourceContainer
protected SimulatedResourceContainer(SimuComModel myModel, String containerID, List<SimulatedResourceContainer> nestedContainer, SimulatedResourceContainer parent)
-
-
Method Detail
-
createPassiveResource
public de.uka.ipd.sdq.scheduler.IPassiveResource createPassiveResource(org.palladiosimulator.pcm.repository.PassiveResource resource, org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext, long capacity)
-
getNestedResourceContainers
public List<SimulatedResourceContainer> getNestedResourceContainers()
-
getParentResourceContainer
public SimulatedResourceContainer getParentResourceContainer()
-
addNestedResourceContainer
public void addNestedResourceContainer(String nestedResourceContainerId)
-
setParentResourceContainer
public void setParentResourceContainer(String parentResourceContainerId)
-
addActiveResource
public void addActiveResource(org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification activeResource, String[] providedInterfaceIds, String resourceContainerID, String schedulingStrategyID)
-
addActiveResourceWithoutCalculators
public ScheduledResource addActiveResourceWithoutCalculators(org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification activeResource, String[] providedInterfaceIds, String resourceContainerID, String schedulingStrategyID)
-
loadActiveResource
public void loadActiveResource(SimuComSimProcess requestingProcess, String typeID, double demand)
Demand processing of a resource demand by a given type of active resources. If the resource container has no own resources, look in parent resource container.- Overrides:
loadActiveResourcein classAbstractSimulatedResourceContainer- Parameters:
requestingProcess- The thread requesting the processing of a resouce demandtypeID- ID of the resource type to which the demand is directed. Same as the PCM resource type IDsdemand- The demand in units processable by the resource. The resource is responsible itself for converting this demand into time spans
-
loadActiveResource
public void loadActiveResource(SimuComSimProcess requestingProcess, String providedInterfaceID, int resourceServiceID, double demand)
Demand processing of a resource demand by a given type of active resource and a resource interface operation. If the resource container has no own resources, look in parent resource container.- Overrides:
loadActiveResourcein classAbstractSimulatedResourceContainer- Parameters:
requestingProcess- The thread requesting the processing of a resource demandtypeID- ID of the resource provided interface to which the demand is directed.resourceServiceID- the id of the resource service to be called.demand- The demand in units processable by the resource. The resource is responsible itself for converting this demand into time spans
-
loadActiveResource
public void loadActiveResource(SimuComSimProcess requestingProcess, String providedInterfaceID, int resourceServiceID, Map<String,Serializable> parameterMap, double demand)
Demand processing of a resource demand by a given type of active resource and a resource interface operation and additional parameters which can be used in an active resource- Overrides:
loadActiveResourcein classAbstractSimulatedResourceContainer- Parameters:
requestingProcess- The thread requesting the processing of a resource demandprovidedInterfaceID- ID of the resource provided interface to which the demand is directed.resourceServiceID- the id of the resource service to be called. itself for converting this demand into time spansparameterMap- Additional Parameters usable in an active resource. Parameters represented asdemand- The demand in units processable by the resource. The resource is responsible
-
-