Class AbstractProbe<E,C extends ProbeConfiguration>
- java.lang.Object
-
- edu.kit.ipd.sdq.eventsim.measurement.probe.AbstractProbe<E,C>
-
- Type Parameters:
E
- the type of the probed element
- All Implemented Interfaces:
MeasurementProducer<E>
,IProbe<E>
- Direct Known Subclasses:
ActiveUsersProbe
,InterArrivalTimeProbe
,InterDepartureTimeProbe
,PassiveQueueLengthProbe
,PassiveResourceAcquiredProbe
,PassiveResourceReleasedProbe
,PassiveResourceRequestedProbe
,QueueLengthProbe
,ResourceDemandProbe
,ResourceDemandProbe
,SeffActionEntryTimeProbe
,SeffActionExitTimeProbe
,UsageActionEntryTimeProbe
,UsageActionExitTimeProbe
public abstract class AbstractProbe<E,C extends ProbeConfiguration> extends Object implements IProbe<E>
-
-
Field Summary
Fields Modifier and Type Field Description protected MeasurementCache<E>
cache
protected C
configuration
protected List<MeasurementListener<E>>
measurementListener
protected MeasuringPoint<E>
measuringPoint
-
Constructor Summary
Constructors Constructor Description AbstractProbe(MeasuringPoint<E> p, C configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disableCaching()
Disables caching of measurements for this probe and removes cached measurements, if any.void
enableCaching()
Enables caching of measurements for this probe.boolean
equals(Object obj)
void
forEachMeasurement(MeasurementListener<E> l)
Measurement<E>
getLastMeasurementOf(Object who)
Returns the latest measurement caused by the given trigger.MeasuringPoint<E>
getMeasuringPoint()
int
hashCode()
-
-
-
Field Detail
-
cache
protected MeasurementCache<E> cache
-
measurementListener
protected List<MeasurementListener<E>> measurementListener
-
measuringPoint
protected MeasuringPoint<E> measuringPoint
-
configuration
protected C extends ProbeConfiguration configuration
-
-
Constructor Detail
-
AbstractProbe
public AbstractProbe(MeasuringPoint<E> p, C configuration)
-
-
Method Detail
-
getLastMeasurementOf
public Measurement<E> getLastMeasurementOf(Object who)
Description copied from interface:IProbe
Returns the latest measurement caused by the given trigger.- Specified by:
getLastMeasurementOf
in interfaceIProbe<E>
- Parameters:
who
- the trigger- Returns:
- the most recent measurement caused by the given trigger, or
null
, if there is no such measurement.
-
forEachMeasurement
public void forEachMeasurement(MeasurementListener<E> l)
- Specified by:
forEachMeasurement
in interfaceMeasurementProducer<E>
-
getMeasuringPoint
public MeasuringPoint<E> getMeasuringPoint()
- Specified by:
getMeasuringPoint
in interfaceIProbe<E>
- Returns:
- the measuring point this probe is attached to.
-
enableCaching
public void enableCaching()
Enables caching of measurements for this probe. If caching is already enabled, this method has no effect.- Specified by:
enableCaching
in interfaceIProbe<E>
-
disableCaching
public void disableCaching()
Disables caching of measurements for this probe and removes cached measurements, if any. If caching is already disabled, this method has no effect.- Specified by:
disableCaching
in interfaceIProbe<E>
-
-