Class SlidingWindowRecorder
java.lang.Object
org.palladiosimulator.recorderframework.AbstractRecorder
org.palladiosimulator.experimentanalysis.SlidingWindowRecorder
- All Implemented Interfaces:
org.palladiosimulator.measurementframework.listener.IMeasurementSourceListener,org.palladiosimulator.recorderframework.IRecorder
public class SlidingWindowRecorder
extends org.palladiosimulator.recorderframework.AbstractRecorder
This class implements a
Recorder which writes incoming data into a sliding window rather
than passing it on to a persistence framework like EDP2.-
Constructor Summary
ConstructorsConstructorDescriptionSlidingWindowRecorder(SlidingWindow slidingWindow, Iterable<ISlidingWindowListener> listeners) Initializes a new instance of theSlidingWindowRecorderclass with the given parameters.SlidingWindowRecorder(SlidingWindow slidingWindow, ISlidingWindowListener listener) Initializes a new instance of theSlidingWindowRecorderclass with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidflush()
It has the correspondingSlidingWindowinstance discard the collected data.voidinitialize(org.palladiosimulator.recorderframework.config.IRecorderConfiguration recorderConfiguration)
This implementation does nothing.voidwriteData(org.palladiosimulator.measurementframework.MeasuringValue measurement)
That is, the given measurement is written into the associatedSlidingWindow.Methods inherited from class org.palladiosimulator.recorderframework.AbstractRecorder
newMeasurementAvailable, preUnregister
-
Constructor Details
-
SlidingWindowRecorder
public SlidingWindowRecorder(SlidingWindow slidingWindow, Iterable<ISlidingWindowListener> listeners) Initializes a new instance of theSlidingWindowRecorderclass with the given parameters.- Parameters:
slidingWindow-SlidingWindowto write incoming measurements into.listeners- A collection ofISlidingWindowListeners, typicallySlidingWindowAggregators, that will be attached to the given window (nullis okay).- Throws:
IllegalArgumentException- If the given window isnull.
-
SlidingWindowRecorder
Initializes a new instance of theSlidingWindowRecorderclass with the given parameters.- Parameters:
slidingWindow-SlidingWindowto write incoming measurements into.listener- AISlidingWindowListener, typically aSlidingWindowAggregator, that will be attached to the given window.- Throws:
IllegalArgumentException- If the given window isnull.
-
-
Method Details
-
initialize
public void initialize(org.palladiosimulator.recorderframework.config.IRecorderConfiguration recorderConfiguration)
This implementation does nothing. -
writeData
public void writeData(org.palladiosimulator.measurementframework.MeasuringValue measurement)
That is, the given measurement is written into the associatedSlidingWindow.- Throws:
IllegalArgumentException- If the given measurement isnullor does not adhere to the metric the associated window accepts.IllegalStateException- If this window is not initialized, i.e.,SlidingWindow#initialize(SimuComModel)has not been called beforehand.
-
flush
public void flush()
It has the correspondingSlidingWindowinstance discard the collected data.
-