Class 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
    • 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.BasicEventProbe

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

        addObserver, getMetricDesciption, isCompatibleWith, notifyMeasurementSourceListener, removeObserver
      • Methods inherited from interface org.palladiosimulator.metricspec.metricentity.IMetricEntity

        getMetricDesciption, isCompatibleWith
    • 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 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>