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 aRecorder
which 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 theSlidingWindowRecorder
class with the given parameters.SlidingWindowRecorder(SlidingWindow slidingWindow, ISlidingWindowListener listener)
Initializes a new instance of theSlidingWindowRecorder
class with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flush()
It has the correspondingSlidingWindow
instance discard the collected data.void
initialize(org.palladiosimulator.recorderframework.config.IRecorderConfiguration recorderConfiguration)
This implementation does nothing.void
writeData(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 theSlidingWindowRecorder
class with the given parameters.- Parameters:
slidingWindow
-SlidingWindow
to write incoming measurements into.listeners
- A collection ofISlidingWindowListener
s, typicallySlidingWindowAggregator
s, that will be attached to the given window (null
is okay).- Throws:
IllegalArgumentException
- If the given window isnull
.
-
SlidingWindowRecorder
public SlidingWindowRecorder(SlidingWindow slidingWindow, ISlidingWindowListener listener)
Initializes a new instance of theSlidingWindowRecorder
class with the given parameters.- Parameters:
slidingWindow
-SlidingWindow
to 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 isnull
or 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 correspondingSlidingWindow
instance discard the collected data.
-
-