Class SlidingWindowAggregator

    • Constructor Detail

      • SlidingWindowAggregator

        public SlidingWindowAggregator​(org.palladiosimulator.recorderframework.IRecorder recorderToWriteInto)
        Initializes a new instance of the SlidingWindowAggregator class with the given parameter.
        Parameters:
        recorderToWriteInto - An IRecorder this instance writes the aggregated window data into. Typically, a recorder that writes into a persistence framework like EDP 2 is passed here.
        Throws:
        NullPointerException - If the given IRecorder is null.
      • SlidingWindowAggregator

        public SlidingWindowAggregator​(Collection<org.palladiosimulator.recorderframework.IRecorder> recordersToWriteInto)
        Initializes a new instance of the SlidingWindowAggregator class with the given parameter.
        Parameters:
        recordersToWriteInto - A @Collection of IRecorders this instance writes the aggregated window data into. Typically, recorders that write data into persistence frameworks like EDP 2 are passed here.
        Throws:
        NullPointerException - If the given collection of IRecorders is null.
        IllegalArgumentException - If the given collection of recorders is empty.
    • Method Detail

      • addRecorder

        public void addRecorder​(org.palladiosimulator.recorderframework.IRecorder recorder)
      • processWindowData

        protected abstract org.palladiosimulator.measurementframework.MeasuringValue processWindowData​(Iterable<org.palladiosimulator.measurementframework.MeasuringValue> windowData,
                                                                                                       javax.measure.Measure<Double,​javax.measure.quantity.Duration> windowLeftBound,
                                                                                                       javax.measure.Measure<Double,​javax.measure.quantity.Duration> windowLength)
        By implementing this method, subclasses (i.e., concrete aggregators) specify how the window data is aggregated/processed and what resulting measurement is passed on to the attached recorder.
        Parameters:
        windowData - The window data to be processed.
        windowLeftBound - A Measure denoting the new left bound of the sliding window.
        windowLength - A Measure denoting the length of the sliding window.
        Returns:
        A MeasuringValue that is to be passed on to the attached recorder.
      • onSlidingWindowFull

        public final void onSlidingWindowFull​(Iterable<org.palladiosimulator.measurementframework.MeasuringValue> windowData,
                                              javax.measure.Measure<Double,​javax.measure.quantity.Duration> windowLeftBound,
                                              javax.measure.Measure<Double,​javax.measure.quantity.Duration> windowLength)
        Description copied from interface: ISlidingWindowListener
        This callback method is triggered by each observed window once it is full, that is, just before it is about to move on.
        Specified by:
        onSlidingWindowFull in interface ISlidingWindowListener
        Parameters:
        windowData - An Iterable containing the currently collected window data, that is, all MeasuringValues within the window's current bounds.
        windowLeftBound - A Measure denoting the window's current lower/left bound.
        windowLength - A Measure denoting the current window length.