public class SlidingWindowRecorder
extends org.palladiosimulator.recorderframework.AbstractRecorder
Recorder
which writes incoming data into a sliding window rather
than passing it on to a persistence framework like EDP2.Constructor and Description |
---|
SlidingWindowRecorder(SlidingWindow slidingWindow,
ISlidingWindowListener listener)
Initializes a new instance of the
SlidingWindowRecorder class with the given
parameters. |
SlidingWindowRecorder(SlidingWindow slidingWindow,
java.lang.Iterable<ISlidingWindowListener> listeners)
Initializes a new instance of the
SlidingWindowRecorder class with the given
parameters. |
Modifier and Type | Method and Description |
---|---|
void |
flush()
It has the corresponding SlidingWindow 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 associated SlidingWindow . |
public SlidingWindowRecorder(SlidingWindow slidingWindow, java.lang.Iterable<ISlidingWindowListener> listeners)
SlidingWindowRecorder
class with the given
parameters.slidingWindow
- SlidingWindow
to write incoming measurements into.listeners
- A collection of ISlidingWindowListener
s, typically
SlidingWindowAggregator
s, that will be attached to the given window (
null
is okay).java.lang.IllegalArgumentException
- If the given window is null
.public SlidingWindowRecorder(SlidingWindow slidingWindow, ISlidingWindowListener listener)
SlidingWindowRecorder
class with the given
parameters.slidingWindow
- SlidingWindow
to write incoming measurements into.listener
- A ISlidingWindowListener
, typically a SlidingWindowAggregator
,
that will be attached to the given window.java.lang.IllegalArgumentException
- If the given window is null
.public void initialize(org.palladiosimulator.recorderframework.config.IRecorderConfiguration recorderConfiguration)
public void writeData(org.palladiosimulator.measurementframework.MeasuringValue measurement)
SlidingWindow
.java.lang.IllegalArgumentException
- If the given measurement is null
or does not adhere to the metric the
associated window accepts.java.lang.IllegalStateException
- If this window is not initialized, i.e.,
SlidingWindow#initialize(SimuComModel)
has not been called beforehand.public void flush()
SlidingWindow
instance discard the collected data.