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, updategetModelgetEncapsulatedEntity, isScheduled, reschedulegetNamepublic 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)
AbstractScheduledResourceconsumeResource in class AbstractScheduledResourceabstractDemand - : 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 AbstractScheduledResourcepublic void updateDemand(SimuComSimProcess thread, double demand)
updateDemand in class AbstractScheduledResourcepublic IActiveResource getScheduledResource()
getScheduledResource in class AbstractScheduledResourcepublic void activateResource()
AbstractScheduledResourceactivateResource in class AbstractScheduledResourcepublic void deactivateResource()
AbstractScheduledResourceIStateListener#stateChanged() event.deactivateResource in class AbstractScheduledResourcepublic static String getNextResourceId()
public org.palladiosimulator.pcm.resourceenvironment.LinkingResource getLinkingResource()