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.core.IRecorder
public class SlidingWindowRuntimeMeasurementsRecorder
extends PRMRecorder
implements org.palladiosimulator.recorderframework.core.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.
MeasurementSpecifications 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
ConstructorsConstructorDescriptionSlidingWindowRuntimeMeasurementsRecorder(RuntimeMeasurementModel rmModel, org.palladiosimulator.monitorrepository.MeasurementSpecification measurementSpecification) Initializes a new instance of theSlidingWindowRuntimeMeasurementsRecorderclass with the given arguments.
TheMeasuringPointto be used by theRuntimeMeasurementis obtained from theMonitorassociated with the passedMeasurementSpecification.SlidingWindowRuntimeMeasurementsRecorder(RuntimeMeasurementModel rmModel, org.palladiosimulator.monitorrepository.MeasurementSpecification measurementSpecification, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint) Initializes a new instance of theSlidingWindowRuntimeMeasurementsRecorderclass with the given arguments. -
Method Summary
Modifier and TypeMethodDescriptionvoidflush()
This implementation does nothing.voidinitialize(org.palladiosimulator.recorderframework.core.config.IRecorderConfiguration recorderConfiguration)
This implementation does nothing.voidnewMeasurementAvailable(org.palladiosimulator.measurementframework.MeasuringValue newMeasurement)
This implementation forwards the measured value obtained from the givenMeasuringValueto theRuntimeMeasurementModel.voidvoidwriteData(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 theSlidingWindowRuntimeMeasurementsRecorderclass with the given arguments.- Parameters:
rmModel- TheRuntimeMeasurementModelall incoming data shall be forwarded to.measurementSpecification- TheMeasurementSpecificationas defined in aMonitorRepositorymodel corresponding to the measurements to be propagated.measuringPoint- TheMeasuringPointto 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 theSlidingWindowRuntimeMeasurementsRecorderclass with the given arguments.
TheMeasuringPointto be used by theRuntimeMeasurementis obtained from theMonitorassociated with the passedMeasurementSpecification.- Parameters:
rmModel- TheRuntimeMeasurementModelall incoming data shall be forwarded to.measurementSpecification- TheMeasurementSpecificationas defined in aMonitorRepositorymodel 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.core.config.IRecorderConfiguration recorderConfiguration)
This implementation does nothing.- Specified by:
initializein interfaceorg.palladiosimulator.recorderframework.core.IRecorder
-
writeData
public void writeData(org.palladiosimulator.measurementframework.MeasuringValue measurement) - Specified by:
writeDatain interfaceorg.palladiosimulator.recorderframework.core.IRecorder
-
flush
public void flush()
This implementation does nothing.- Specified by:
flushin interfaceorg.palladiosimulator.recorderframework.core.IRecorder
-
newMeasurementAvailable
public void newMeasurementAvailable(org.palladiosimulator.measurementframework.MeasuringValue newMeasurement)
This implementation forwards the measured value obtained from the givenMeasuringValueto theRuntimeMeasurementModel.- Specified by:
newMeasurementAvailablein interfaceorg.palladiosimulator.measurementframework.listener.IMeasurementSourceListener- Throws:
NullPointerException- In case== null.IllegalArgumentException- In casenewMeasurementis not compatible with the expected data metric.
-
preUnregister
public void preUnregister()- Specified by:
preUnregisterin interfaceorg.palladiosimulator.measurementframework.listener.IMeasurementSourceListener
-