Class EventBasedProbe<V,Q extends javax.measure.quantity.Quantity>

java.lang.Object
org.palladiosimulator.probeframework.probes.Probe
org.palladiosimulator.analyzer.slingshot.monitor.probes.EventBasedProbe<V,Q>
Type Parameters:
V - The value type of the measurement.
Q - The quantity type of the measurement.
All Implemented Interfaces:
org.palladiosimulator.commons.designpatterns.IAbstractObservable<org.palladiosimulator.probeframework.probes.listener.IProbeListener>, org.palladiosimulator.metricspec.metricentity.IMetricEntity
Direct Known Subclasses:
EventBasedBasicProbe, EventBasedListProbe

public abstract class EventBasedProbe<V,Q extends javax.measure.quantity.Quantity> extends org.palladiosimulator.probeframework.probes.Probe
A probe that is DESEvent-based. Measurements/Probes are taken when the associated DESEvent was published.
  • Field Summary

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

    metricEntityDelegate
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    EventBasedProbe(org.palladiosimulator.metricspec.MetricDescription metricDescription)
    Constructs an event-based probe with EventDistinguisher.DEFAULT_DISTINGUISHER.
     
    EventBasedProbe(org.palladiosimulator.metricspec.MetricDescription metricDescription, EventDistinguisher distinguisher)
    Constructs an event-based probe.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    abstract javax.measure.Measure<V,Q>
    getMeasurement(org.palladiosimulator.analyzer.slingshot.common.events.DESEvent event)
    An implementation that returns a Measure from an DESEvent.
    protected abstract org.palladiosimulator.probeframework.measurement.ProbeMeasurement
    getProbeMeasurement(org.palladiosimulator.analyzer.slingshot.common.events.DESEvent event)
    Get a ProbeMeasurement from an DESEvent.
    void
    takeMeasurement(org.palladiosimulator.analyzer.slingshot.common.events.DESEvent event)
    Takes a measurement of the event type.

    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
  • Constructor Details

    • EventBasedProbe

      protected EventBasedProbe(org.palladiosimulator.metricspec.MetricDescription metricDescription)
      Constructs an event-based probe with EventDistinguisher.DEFAULT_DISTINGUISHER.
      Parameters:
      eventType - The event type to listen to.
      metricDescription - A metric description needed by the super-class.
    • EventBasedProbe

      public EventBasedProbe(org.palladiosimulator.metricspec.MetricDescription metricDescription, EventDistinguisher distinguisher)
      Constructs an event-based probe.
      Parameters:
      eventType - The event type to listen to.
      metricDescription - A metric description needed by the super-class.
      distinguisher - The distinguisher that is used for creating RequestContexts.
  • Method Details

    • takeMeasurement

      public void takeMeasurement(org.palladiosimulator.analyzer.slingshot.common.events.DESEvent event)
      Takes a measurement of the event type. The passed event must be of the given type by #getEventType().

      This calls #getMeasure(DESEvent) and wraps it into a ProbeMeasurement and notifies the listeners.

      Parameters:
      event - The event that happened and is of type #getEventType().
      Throws:
      IllegalArgumentException - if the passed event is not of the type returned by #getEventType().
      See Also:
    • getMeasurement

      public abstract javax.measure.Measure<V,Q> getMeasurement(org.palladiosimulator.analyzer.slingshot.common.events.DESEvent event)
      An implementation that returns a Measure from an DESEvent. That measure is needed by takeMeasurement(DESEvent).
      Parameters:
      event - The event that happened.
      Returns:
      A Measure from the event.
    • getProbeMeasurement

      protected abstract org.palladiosimulator.probeframework.measurement.ProbeMeasurement getProbeMeasurement(org.palladiosimulator.analyzer.slingshot.common.events.DESEvent event)
      Get a ProbeMeasurement from an DESEvent. Depending on the type of probe, the measurements IMeasureProvider may differ.
      Parameters:
      event - The event that happened.
      Returns:
      A ProbeMeasurement from the event.
    • getDistinguisher

      public EventDistinguisher getDistinguisher()