Class AbstractSimulatedResourceContainer

java.lang.Object
de.uka.ipd.sdq.simucomframework.resources.AbstractSimulatedResourceContainer
Direct Known Subclasses:
SimulatedLinkingResourceContainer, SimulatedResourceContainer

public abstract class AbstractSimulatedResourceContainer extends Object
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 Details

  • Constructor Details

    • AbstractSimulatedResourceContainer

      public AbstractSimulatedResourceContainer(SimuComModel myModel, String myContainerID)
  • Method Details

    • loadActiveResource

      public void 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 instances
      Parameters:
      requestingProcess - The thread requesting the processing of a resource demand
      typeID - ID of the resource type to which the demand is directed. Same as the PCM resource type IDs
      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, 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 demand
      typeID - 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 demand
      providedInterfaceID - 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

      public Collection<AbstractScheduledResource> getActiveResources()
      Retrieves all active resources in this resource container.
      Returns:
      all active resources
    • getAllActiveResources

      public HashMap<String,AbstractScheduledResource> getAllActiveResources()
      Retrieves the HashMap with all all active resources in this resource container.
      Returns:
      all active resources
    • getFailedResources

      public List<AbstractScheduledResource> getFailedResources()
      Retrieves all active resources in this resource container which are currently unavailable.
      Returns:
      all unavailable active resources
    • getResourceContainerID

      public String 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 demand
      resourceServiceID - 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 IDs
      demand - The demand in units processable by the resource. The resource is responsible itself for converting this demand into time spans