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 theIDemandListener
interface and to register itself in theregisterListener
method to this scheduled resource. The measured demand is directly received by thedemand
call-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 void
demand(double demand)
The demand measure is directly forwarded to the notify method.void
demandCompleted(de.uka.ipd.sdq.scheduler.ISchedulableProcess simProcess)
No need to react on demand completion within this probe.protected void
registerListener()
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:
demand
in interfaceIDemandListener
-
demandCompleted
public void demandCompleted(de.uka.ipd.sdq.scheduler.ISchedulableProcess simProcess)
No need to react on demand completion within this probe.- Specified by:
demandCompleted
in interfaceIDemandListener
-
registerListener
protected void registerListener()
Registers this class to the scheduled resource (event source type).- Specified by:
registerListener
in classorg.palladiosimulator.probeframework.probes.EventProbe<AbstractScheduledResource>
-
-