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
ConstructorsModifierConstructorDescriptionprotectedEventBasedProbe(org.palladiosimulator.metricspec.MetricDescription metricDescription) Constructs an event-based probe withEventDistinguisher.DEFAULT_DISTINGUISHER.EventBasedProbe(org.palladiosimulator.metricspec.MetricDescription metricDescription, EventDistinguisher distinguisher) Constructs an event-based probe. -
Method Summary
Modifier and TypeMethodDescriptiongetMeasurement(org.palladiosimulator.analyzer.slingshot.common.events.DESEvent event) An implementation that returns aMeasurefrom anDESEvent.protected abstract org.palladiosimulator.probeframework.measurement.ProbeMeasurementgetProbeMeasurement(org.palladiosimulator.analyzer.slingshot.common.events.DESEvent event) Get aProbeMeasurementfrom anDESEvent.voidtakeMeasurement(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
-
Constructor Details
-
EventBasedProbe
protected EventBasedProbe(org.palladiosimulator.metricspec.MetricDescription metricDescription) Constructs an event-based probe withEventDistinguisher.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 creatingRequestContexts.
-
-
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 aProbeMeasurementand 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 aMeasurefrom anDESEvent. That measure is needed bytakeMeasurement(DESEvent).- Parameters:
event- The event that happened.- Returns:
- A
Measurefrom the event.
-
getProbeMeasurement
protected abstract org.palladiosimulator.probeframework.measurement.ProbeMeasurement getProbeMeasurement(org.palladiosimulator.analyzer.slingshot.common.events.DESEvent event) Get aProbeMeasurementfrom anDESEvent. Depending on the type of probe, the measurementsIMeasureProvidermay differ.- Parameters:
event- The event that happened.- Returns:
- A
ProbeMeasurementfrom the event.
-
getDistinguisher
-