Interface IActiveResource

  • All Known Implementing Classes:
    EventSimActiveResourceModel

    public interface IActiveResource
    Represents an active resource simulation component which can be consumed. TODO (SimComp) Introduce active resource simulation events
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void consume​(IRequest request, org.palladiosimulator.pcm.resourceenvironment.ResourceContainer resourceContainer, org.palladiosimulator.pcm.resourcetype.ResourceType resourceType, double absoluteDemand, int resourceServiceID, Procedure onServedCallback)
      Simulates a resource demand by the specified request.
      org.palladiosimulator.pcm.resourcetype.ResourceType findResourceType​(org.palladiosimulator.pcm.resourcetype.ResourceInterface resourceInterface)
      Finds and returns the resource type providing the specified resource interface.
    • Method Detail

      • consume

        void consume​(IRequest request,
                     org.palladiosimulator.pcm.resourceenvironment.ResourceContainer resourceContainer,
                     org.palladiosimulator.pcm.resourcetype.ResourceType resourceType,
                     double absoluteDemand,
                     int resourceServiceID,
                     Procedure onServedCallback)
        Simulates a resource demand by the specified request.
        Parameters:
        request - the demanding request
        resourceContainer - the resource container of the requested resource
        resourceType - the type of the requested resource
        absoluteDemand - the resource demand
        onServedCallback - the callback to be invoked once the requested demand has been served
      • findResourceType

        org.palladiosimulator.pcm.resourcetype.ResourceType findResourceType​(org.palladiosimulator.pcm.resourcetype.ResourceInterface resourceInterface)
        Finds and returns the resource type providing the specified resource interface. If multiple resource types provide the specified interface, the result of this method is unspecified, so far.
        Parameters:
        resourceInterface - the resource interface
        Returns:
        the resource type that provides the specified resource interface; null, if no such resource type could be found