Class AbstractSimulatedResourceContainer
java.lang.Object
de.uka.ipd.sdq.simucomframework.resources.AbstractSimulatedResourceContainer
- Direct Known Subclasses:
SimulatedLinkingResourceContainer
,SimulatedResourceContainer
Base class for simulated resource container. A resource container corresponds to PCM resource
container in such that they contain an arbitrary amount of active resources.
-
Field Summary
Modifier and TypeFieldDescriptionprotected HashMap<String,
AbstractScheduledResource> protected static final org.apache.log4j.Logger
protected final String
protected final SimuComModel
-
Constructor Summary
ConstructorDescriptionAbstractSimulatedResourceContainer
(SimuComModel myModel, String myContainerID) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves all active resources in this resource container.Retrieves the HashMap with all all active resources in this resource container.Retrieves all active resources in this resource container which are currently unavailable.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 instancesvoid
loadActiveResource
(SimuComSimProcess requestingProcess, 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 instancesvoid
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 operationvoid
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
-
Field Details
-
LOGGER
protected static final org.apache.log4j.Logger LOGGER -
myModel
-
myContainerID
-
activeResources
-
activeResourceProvidedInterfaces
-
-
Constructor Details
-
AbstractSimulatedResourceContainer
-
-
Method Details
-
loadActiveResource
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- Parameters:
requestingProcess
- The thread requesting the processing of a resource 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- 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- 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.parameterMap
- 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 itself for converting this demand into time spans
-
getActiveResources
Retrieves all active resources in this resource container.- Returns:
- all active resources
-
getAllActiveResources
Retrieves the HashMap with all all active resources in this resource container.- Returns:
- all active resources
-
getFailedResources
Retrieves all active resources in this resource container which are currently unavailable.- Returns:
- all unavailable active resources
-
getResourceContainerID
- Returns:
- The ID of the resource container itself
-
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- 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
-