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 the IDemandListener interface and to register itself in the registerListener method to this scheduled resource. The measured demand is directly received by the demand call-back method of the listener.
  • Field Summary

    Fields inherited from class org.palladiosimulator.probeframework.probes.EventProbe

    eventSource

    Fields inherited from class org.palladiosimulator.probeframework.probes.Probe

    metricEntityDelegate
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    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
    Registers this class to the scheduled resource (event source type).

    Methods inherited from class org.palladiosimulator.probeframework.probes.BasicEventProbe

    notify

    Methods inherited from class org.palladiosimulator.probeframework.probes.Probe

    addObserver, getMetricDesciption, isCompatibleWith, notifyMeasurementSourceListener, removeObserver

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.palladiosimulator.metricspec.metricentity.IMetricEntity

    getMetricDesciption, isCompatibleWith
  • Constructor Details

    • TakeScheduledResourceDemandProbe

      public TakeScheduledResourceDemandProbe(AbstractScheduledResource resource)
      Default constructor.
      Parameters:
      resource - The event source is a scheduled resource, thus, notifying about newly available demands.
  • Method Details

    • demand

      public void demand(double demand)
      The demand measure is directly forwarded to the notify method.
      Specified by:
      demand in interface IDemandListener
    • 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 interface IDemandListener
    • registerListener

      protected void registerListener()
      Registers this class to the scheduled resource (event source type).
      Specified by:
      registerListener in class org.palladiosimulator.probeframework.probes.EventProbe<AbstractScheduledResource>