Class SlidingWindowRuntimeMeasurementsRecorder
java.lang.Object
org.palladiosimulator.simulizar.metrics.PRMRecorder
org.palladiosimulator.simulizar.slidingwindow.runtimemeasurement.SlidingWindowRuntimeMeasurementsRecorder
- All Implemented Interfaces:
org.palladiosimulator.measurementframework.listener.IMeasurementSourceListener
,org.palladiosimulator.recorderframework.IRecorder
public class SlidingWindowRuntimeMeasurementsRecorder
extends PRMRecorder
implements org.palladiosimulator.recorderframework.IRecorder
This class is responsible for propagating sliding window based measurements from
Examples of such measurements are power or energy consumption measurements, or the sliding window based computation of utilization.
MeasurementSpecification
s to the RuntimeMeasurementModel (formerly known as PRM).Examples of such measurements are power or energy consumption measurements, or the sliding window based computation of utilization.
-
Constructor Summary
ConstructorDescriptionSlidingWindowRuntimeMeasurementsRecorder
(RuntimeMeasurementModel rmModel, org.palladiosimulator.monitorrepository.MeasurementSpecification measurementSpecification) Initializes a new instance of theSlidingWindowRuntimeMeasurementsRecorder
class with the given arguments.
TheMeasuringPoint
to be used by theRuntimeMeasurement
is obtained from theMonitor
associated with the passedMeasurementSpecification
.SlidingWindowRuntimeMeasurementsRecorder
(RuntimeMeasurementModel rmModel, org.palladiosimulator.monitorrepository.MeasurementSpecification measurementSpecification, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) Initializes a new instance of theSlidingWindowRuntimeMeasurementsRecorder
class with the given arguments. -
Method Summary
Modifier and TypeMethodDescriptionvoid
flush()
This implementation does nothing.void
initialize
(org.palladiosimulator.recorderframework.config.IRecorderConfiguration recorderConfiguration)
This implementation does nothing.void
newMeasurementAvailable
(org.palladiosimulator.measurementframework.MeasuringValue newMeasurement)
This implementation forwards the measured value obtained from the givenMeasuringValue
to theRuntimeMeasurementModel
.void
void
writeData
(org.palladiosimulator.measurementframework.MeasuringValue measurement) Methods inherited from class org.palladiosimulator.simulizar.metrics.PRMRecorder
detachFromPRM, getMeasurementSpecification, getPRMMeasurement, getPrmModel, updateMeasurementValue
-
Constructor Details
-
SlidingWindowRuntimeMeasurementsRecorder
public SlidingWindowRuntimeMeasurementsRecorder(RuntimeMeasurementModel rmModel, org.palladiosimulator.monitorrepository.MeasurementSpecification measurementSpecification, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) Initializes a new instance of theSlidingWindowRuntimeMeasurementsRecorder
class with the given arguments.- Parameters:
rmModel
- TheRuntimeMeasurementModel
all incoming data shall be forwarded to.measurementSpecification
- TheMeasurementSpecification
as defined in aMonitorRepository
model corresponding to the measurements to be propagated.measuringPoint
- TheMeasuringPoint
to be used for theRuntimeMeasurement
.- Throws:
NullPointerException
- In case any argument isnull
.- See Also:
-
SlidingWindowRuntimeMeasurementsRecorder
public SlidingWindowRuntimeMeasurementsRecorder(RuntimeMeasurementModel rmModel, org.palladiosimulator.monitorrepository.MeasurementSpecification measurementSpecification) Initializes a new instance of theSlidingWindowRuntimeMeasurementsRecorder
class with the given arguments.
TheMeasuringPoint
to be used by theRuntimeMeasurement
is obtained from theMonitor
associated with the passedMeasurementSpecification
.- Parameters:
rmModel
- TheRuntimeMeasurementModel
all incoming data shall be forwarded to.measurementSpecification
- TheMeasurementSpecification
as defined in aMonitorRepository
model corresponding to the measurements to be propagated.- Throws:
NullPointerException
- In case either argument isnull
.- See Also:
-
-
Method Details
-
initialize
public void initialize(org.palladiosimulator.recorderframework.config.IRecorderConfiguration recorderConfiguration)
This implementation does nothing.- Specified by:
initialize
in interfaceorg.palladiosimulator.recorderframework.IRecorder
-
writeData
public void writeData(org.palladiosimulator.measurementframework.MeasuringValue measurement) - Specified by:
writeData
in interfaceorg.palladiosimulator.recorderframework.IRecorder
-
flush
public void flush()
This implementation does nothing.- Specified by:
flush
in interfaceorg.palladiosimulator.recorderframework.IRecorder
-
newMeasurementAvailable
public void newMeasurementAvailable(org.palladiosimulator.measurementframework.MeasuringValue newMeasurement)
This implementation forwards the measured value obtained from the givenMeasuringValue
to theRuntimeMeasurementModel
.- Specified by:
newMeasurementAvailable
in interfaceorg.palladiosimulator.measurementframework.listener.IMeasurementSourceListener
- Throws:
NullPointerException
- In case== null
.IllegalArgumentException
- In casenewMeasurement
is not compatible with the expected data metric.
-
preUnregister
public void preUnregister()- Specified by:
preUnregister
in interfaceorg.palladiosimulator.measurementframework.listener.IMeasurementSourceListener
-