public class SimulatedLinkingResource extends AbstractScheduledResource
#consumeResource(SimuComSimProcess, double)
, and they is loaded by latency + demand /
throughput.Constructor and Description |
---|
SimulatedLinkingResource(org.palladiosimulator.pcm.resourceenvironment.LinkingResource linkingResource,
SimuComModel simuComModel,
String resourceContainerID) |
Modifier and Type | Method and Description |
---|---|
void |
activateResource()
Called by the framework to inform that the resource should start its lifecycle
|
void |
consumeResource(SimuComSimProcess process,
int resourceServiceID,
Map<String,Serializable> parameterMap,
double abstractDemand)
Called by client of this resource to make the resource simulate resource processing.
|
void |
deactivateResource()
Called by the framework to inform the resource that the simulation has been stopped.
|
String |
getId() |
org.palladiosimulator.pcm.resourceenvironment.LinkingResource |
getLinkingResource() |
static String |
getNextResourceId() |
double |
getRemainingDemandForProcess(SimuComSimProcess thread) |
IActiveResource |
getScheduledResource() |
void |
updateDemand(SimuComSimProcess thread,
double demand) |
addDemandListener, addOverallUtilizationListener, addStateListener, demandCompleted, getDescription, getNumberOfInstances, getQueueLength, getResourceTypeId, getSchedulingStrategyID, getUnderlyingResource, isAvailable, isRequiredByContainer, setAvailable, update
getModel
getEncapsulatedEntity, isScheduled, reschedule
getName
public SimulatedLinkingResource(org.palladiosimulator.pcm.resourceenvironment.LinkingResource linkingResource, SimuComModel simuComModel, String resourceContainerID)
public String getId()
public void consumeResource(SimuComSimProcess process, int resourceServiceID, Map<String,Serializable> parameterMap, double abstractDemand)
AbstractScheduledResource
consumeResource
in class AbstractScheduledResource
abstractDemand
- : may be zero, in that case only the latency is considered.process
- The thread or job requesting the processing of its demandresourceServiceID
- The id of the resource service to be called for resource consumptionparameterMap
- Additional parameters which can be used by the resource. Map can be empty.public double getRemainingDemandForProcess(SimuComSimProcess thread)
getRemainingDemandForProcess
in class AbstractScheduledResource
public void updateDemand(SimuComSimProcess thread, double demand)
updateDemand
in class AbstractScheduledResource
public IActiveResource getScheduledResource()
getScheduledResource
in class AbstractScheduledResource
public void activateResource()
AbstractScheduledResource
activateResource
in class AbstractScheduledResource
public void deactivateResource()
AbstractScheduledResource
IStateListener#stateChanged()
event.deactivateResource
in class AbstractScheduledResource
public static String getNextResourceId()
public org.palladiosimulator.pcm.resourceenvironment.LinkingResource getLinkingResource()