Class IdentityCalculator
- java.lang.Object
-
- org.palladiosimulator.metricspec.metricentity.MetricEntity
-
- org.palladiosimulator.measurementframework.listener.MeasurementSource
-
- org.palladiosimulator.probeframework.calculator.Calculator
-
- org.palladiosimulator.probeframework.calculator.internal.UnaryCalculator
-
- org.palladiosimulator.probeframework.calculator.internal.IdentityCalculator
-
- All Implemented Interfaces:
org.palladiosimulator.commons.designpatterns.IAbstractObservable<org.palladiosimulator.measurementframework.listener.IMeasurementSourceListener>
,org.palladiosimulator.metricspec.metricentity.IMetricEntity
,IProbeListener
public class IdentityCalculator extends UnaryCalculator
Identity calculators are unary calculators that directly let probe measurements pass through. For example, the current state of a "take passive resource state probe" may directly be passed through in order to determine its utilization.
-
-
Field Summary
-
Fields inherited from class org.palladiosimulator.probeframework.calculator.Calculator
probes
-
-
Constructor Summary
Constructors Constructor Description IdentityCalculator(org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint, Probe probe)
Default constructor.IdentityCalculator(org.palladiosimulator.metricspec.MetricDescription metricDescription, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint, Probe probe)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.palladiosimulator.measurementframework.MeasuringValue
calculate(List<ProbeMeasurement> probeMeasurements)
This calculation directly lets a single probe measurement pass through.-
Methods inherited from class org.palladiosimulator.probeframework.calculator.Calculator
equals, getMeasuringPoint, hashCode, newProbeMeasurementAvailable, preUnregister
-
Methods inherited from class org.palladiosimulator.measurementframework.listener.MeasurementSource
addObserver, getMeasurementSourceListeners, notifyMeasurementSourceListener, removeObserver
-
-
-
-
Constructor Detail
-
IdentityCalculator
public IdentityCalculator(org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint, Probe probe)
Default constructor. Directly passes all elements to the unary calculator constructor.- Parameters:
measuringPoint
- MeasuringPoint as needed by the superclass.probe
- The observed probe.
-
IdentityCalculator
public IdentityCalculator(org.palladiosimulator.metricspec.MetricDescription metricDescription, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint, Probe probe)
Default constructor. Directly passes all elements to the unary calculator constructor.- Parameters:
metricDescription
- MetricDescriptions as needed by the superclass.measuringPoint
- MeasuringPoint as needed by the superclass.probe
- The observed probe.
-
-
Method Detail
-
calculate
protected org.palladiosimulator.measurementframework.MeasuringValue calculate(List<ProbeMeasurement> probeMeasurements) throws CalculatorException
This calculation directly lets a single probe measurement pass through. TODO Update JavaDoc- Specified by:
calculate
in classCalculator
- Parameters:
probeMeasurements
- The list of probe measurements is expected to contain a single measurement of type TupleMeasurement.- Returns:
- The probe measurement value wrapped in a measurement.
- Throws:
CalculatorException
- In case the received probe measurements do not conform to the specified metric- See Also:
Calculator.calculate(java.util.List<org.palladiosimulator.probeframework.measurement.ProbeMeasurement>)
-
-