Class SimulatedResourceContainer
java.lang.Object
de.uka.ipd.sdq.simucomframework.resources.AbstractSimulatedResourceContainer
de.uka.ipd.sdq.simucomframework.resources.SimulatedResourceContainer
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
ModifierConstructorDescriptionSimulatedResourceContainer
(SimuComModel myModel, String containerID) protected
SimulatedResourceContainer
(SimuComModel myModel, String containerID, List<SimulatedResourceContainer> nestedContainer, SimulatedResourceContainer parent) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addActiveResource
(org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification activeResource, String[] providedInterfaceIds, String resourceContainerID, String schedulingStrategyID) addActiveResourceWithoutCalculators
(org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification activeResource, String[] providedInterfaceIds, String resourceContainerID, String schedulingStrategyID) void
addNestedResourceContainer
(String nestedResourceContainerId) de.uka.ipd.sdq.scheduler.IPassiveResource
createPassiveResource
(org.palladiosimulator.pcm.repository.PassiveResource resource, org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext, long capacity) void
loadActiveResource
(SimuComSimProcess requestingProcess, int resourceServiceID, String typeID, double demand) Demand processing of a resource demand by a given type of active resources.void
loadActiveResource
(SimuComSimProcess requestingProcess, String typeID, double demand) Demand processing of a resource demand by a given type of active resources.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.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.void
setParentResourceContainer
(String parentResourceContainerId) Methods inherited from class de.uka.ipd.sdq.simucomframework.resources.AbstractSimulatedResourceContainer
getActiveResources, getAllActiveResources, getFailedResources, getResourceContainerID
-
Constructor Details
-
SimulatedResourceContainer
-
SimulatedResourceContainer
protected SimulatedResourceContainer(SimuComModel myModel, String containerID, List<SimulatedResourceContainer> nestedContainer, SimulatedResourceContainer parent)
-
-
Method Details
-
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
-
getParentResourceContainer
-
addNestedResourceContainer
-
setParentResourceContainer
-
addActiveResource
-
addActiveResourceWithoutCalculators
public ScheduledResource addActiveResourceWithoutCalculators(org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification activeResource, String[] providedInterfaceIds, String resourceContainerID, String schedulingStrategyID) -
loadActiveResource
public void loadActiveResource(SimuComSimProcess requestingProcess, int resourceServiceID, String typeID, double demand) Demand processing of a resource demand by a given type of active resources. In future versions this has to control schedulers of resource types which exist in multiple instances, use parent container when resource not found.- Overrides:
loadActiveResource
in classAbstractSimulatedResourceContainer
- Parameters:
requestingProcess
- The thread requesting the processing of a resource demandresourceServiceID
- the id of the resource service to be called.typeID
- 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
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:
loadActiveResource
in 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:
loadActiveResource
in 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:
loadActiveResource
in 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 as <parameterName, specification>demand
- The demand in units processable by the resource. The resource is responsible
-