Interface DataWindow
-
- All Known Implementing Classes:
AbstractDataWindow
,LastValueWindow
,MinMaxAggWindow
,MinMaxAggWindow.MaxAggregationWindow
,MinMaxAggWindow.MinAggregationWindow
,MinMaxAggWindow.MinOrMaxAggregationWindow
,NumericalAvgAggWindow
,SeedValueWindow
,SumAggWindow
,TimeWeightAvgWindow
public interface DataWindow
Represents a span of time that will be condensed down into processed values.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addValue(HistoricalValue value)
Adds a value to the window.void
finalize(HistoricalValue trailingValue)
Provides the window with the value that comes next, outside of the window, in order to finalize calculations.long
getEndTime()
The end time of the window, also sometimes referred to as the "block id".HistoricalValue
getEntryValue()
Returns the edge value of the window, which will be used for interpolation from the previous value.HistoricalValue
getExitValue()
Returns the "exit" value of this window.long
getStartTime()
The start time of the window.HistoricalValue
getValue(int level)
Returns the value for the specified "level" of the window.boolean
hasMore(int level)
void
initialize(HistoricalValue entryValue)
Provides the window with the previous window's value.
-
-
-
Method Detail
-
getStartTime
long getStartTime()
The start time of the window. The end time is used as the primary id, but the start time can be useful for calculations.
-
getEndTime
long getEndTime()
The end time of the window, also sometimes referred to as the "block id". This will be the same for all windows of the same row, when using fixed return sizes.
-
hasMore
boolean hasMore(int level)
-
getValue
HistoricalValue getValue(int level)
Returns the value for the specified "level" of the window. Windows generally only have one value, but technically they are allowed to have any number. As long as hasMore is true, this function will be called with an incremented level.
-
getEntryValue
HistoricalValue getEntryValue()
Returns the edge value of the window, which will be used for interpolation from the previous value. This value is not necessarily returned from the getValue() function as part of the window itself.
-
getExitValue
HistoricalValue getExitValue()
Returns the "exit" value of this window. Generally this will be the same as getValue(x) with x=the highest level provided by the window, but sometimes it could be the last received raw value. Interpolation will occur between this value and the entry value of the next window.
-
initialize
void initialize(HistoricalValue entryValue)
Provides the window with the previous window's value. May not be used by all window types.
-
finalize
void finalize(HistoricalValue trailingValue)
Provides the window with the value that comes next, outside of the window, in order to finalize calculations. May not be used by all window types.
-
addValue
void addValue(HistoricalValue value)
Adds a value to the window.
-
-