Class TakeScheduledResourceDemandProbe
- java.lang.Object
-
- org.palladiosimulator.probeframework.probes.Probe
-
- org.palladiosimulator.probeframework.probes.EventProbe<EventSourceType>
-
- org.palladiosimulator.probeframework.probes.BasicEventProbe<AbstractScheduledResource,Double,javax.measure.quantity.Duration>
-
- de.uka.ipd.sdq.simucomframework.probes.TakeScheduledResourceDemandProbe
-
- All Implemented Interfaces:
IDemandListener,org.palladiosimulator.commons.designpatterns.IAbstractObservable<org.palladiosimulator.probeframework.probes.listener.IProbeListener>,org.palladiosimulator.metricspec.metricentity.IMetricEntity
public class TakeScheduledResourceDemandProbe extends org.palladiosimulator.probeframework.probes.BasicEventProbe<AbstractScheduledResource,Double,javax.measure.quantity.Duration> implements IDemandListener
Measures a resource demand metric (in seconds) by listening to demands to a scheduled resource (event source type). Therefore, it has to implement theIDemandListenerinterface and to register itself in theregisterListenermethod to this scheduled resource. The measured demand is directly received by thedemandcall-back method of the listener.
-
-
Constructor Summary
Constructors Constructor Description TakeScheduledResourceDemandProbe(AbstractScheduledResource resource)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddemand(double demand)The demand measure is directly forwarded to the notify method.voiddemandCompleted(de.uka.ipd.sdq.scheduler.ISchedulableProcess simProcess)No need to react on demand completion within this probe.protected voidregisterListener()Registers this class to the scheduled resource (event source type).-
Methods inherited from class org.palladiosimulator.probeframework.probes.Probe
addObserver, getMetricDesciption, isCompatibleWith, notifyMeasurementSourceListener, removeObserver
-
-
-
-
Constructor Detail
-
TakeScheduledResourceDemandProbe
public TakeScheduledResourceDemandProbe(AbstractScheduledResource resource)
Default constructor.- Parameters:
resource- The event source is a scheduled resource, thus, notifying about newly available demands.
-
-
Method Detail
-
demand
public void demand(double demand)
The demand measure is directly forwarded to the notify method.- Specified by:
demandin interfaceIDemandListener
-
demandCompleted
public void demandCompleted(de.uka.ipd.sdq.scheduler.ISchedulableProcess simProcess)
No need to react on demand completion within this probe.- Specified by:
demandCompletedin interfaceIDemandListener
-
registerListener
protected void registerListener()
Registers this class to the scheduled resource (event source type).- Specified by:
registerListenerin classorg.palladiosimulator.probeframework.probes.EventProbe<AbstractScheduledResource>
-
-