Interface RowWindow
-
public interface RowWindow
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TypegetDataType(int columnIndex)Returns the actual data type of the values at the specified column in this window.RowgetRow(int rowIndex)Returns the row at the specified position in this window.RowIteratorgetRowIterator()Returns an iterator used to access this window.longwindowEndTime()For different types of windows, the definition of the window end time is different.intwindowSize()Returns the number of rows in this window.longwindowStartTime()For different types of windows, the definition of the window start time is different.
-
-
-
Method Detail
-
windowSize
int windowSize()
Returns the number of rows in this window.- Returns:
- the number of rows in this window
-
getRow
Row getRow(int rowIndex) throws java.io.IOException
Returns the row at the specified position in this window.Note that the Row instance returned by this method each time is the same instance. In other words, calling this method will only change the member variables inside the Row instance, but will not generate a new Row instance.
- Parameters:
rowIndex- index of the row to return- Returns:
- the row at the specified position in this window, throw IndexOutOfBoundException if call this method on an empty RowWindow.
- Throws:
java.io.IOException- if any I/O errors occur
-
getDataType
Type getDataType(int columnIndex)
Returns the actual data type of the values at the specified column in this window.- Parameters:
columnIndex- index of the specified column- Returns:
- the actual data type of the values at the specified column in this window
-
getRowIterator
RowIterator getRowIterator()
Returns an iterator used to access this window.- Returns:
- an iterator used to access this window
-
windowStartTime
long windowStartTime()
For different types of windows, the definition of the window start time is different.For sliding size window: the window start time is equal to the timestamp of the first row.
For sliding time window: The window start time is determined by displayWindowBegin
SlidingTimeWindowAccessStrategy.getDisplayWindowBegin()and slidingStepSlidingTimeWindowAccessStrategy.getSlidingStep().
The window start time for the i-th window (i starts at 0) can be calculated asdisplayWindowBegin + i * slidingStep.- Returns:
- the start time of the window
- Since:
- 0.13.0
- See Also:
SlidingSizeWindowAccessStrategy,SlidingTimeWindowAccessStrategy
-
windowEndTime
long windowEndTime()
For different types of windows, the definition of the window end time is different.For sliding size window: the window end time is equal to the timestamp of the last row.
For sliding time window: The window end time is determined by displayWindowBegin
SlidingTimeWindowAccessStrategy.getDisplayWindowBegin(), timeIntervalSlidingTimeWindowAccessStrategy.getTimeInterval()and slidingStepSlidingTimeWindowAccessStrategy.getSlidingStep().
The window end time for the i-th window (i starts at 0) can be calculated asdisplayWindowBegin + i * slidingStep + timeInterval - 1orwindowStartTime(i) + timeInterval - 1.- Returns:
- the end time of the window
- Since:
- 0.13.0
- See Also:
SlidingSizeWindowAccessStrategy,SlidingTimeWindowAccessStrategy
-
-