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
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
ConstructorDescriptionIdentityCalculator
(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
Modifier and TypeMethodDescriptionprotected 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
Methods inherited from class org.palladiosimulator.metricspec.metricentity.MetricEntity
getMetricDesciption, isCompatibleWith, setMetricDescription
-
Constructor Details
-
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 Details
-
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:
-