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.AbstractRecorderThis class implements aRecorderwhich writes incoming data into a sliding window rather than passing it on to a persistence framework like EDP2.
-
-
Constructor Summary
Constructors Constructor Description SlidingWindowRecorder(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()
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.
-
-
-
Constructor Detail
-
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
public SlidingWindowRecorder(SlidingWindow slidingWindow, ISlidingWindowListener listener)
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 Detail
-
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.
-
-