Class WindowListState<W>
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.window.tvf.state.WindowListState<W>
-
- All Implemented Interfaces:
WindowState<W>
public final class WindowListState<W> extends Object implements WindowState<W>
A wrapper ofListState
which is easier to update based on window namespace.
-
-
Constructor Summary
Constructors Constructor Description WindowListState(InternalListState<RowData,W,RowData> windowState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(W window, RowData value)
Updates the operator state accessible by#get(W)
by adding the given value to the list of values.void
clear(W window)
Removes the value mapped under current key and the given window.List<RowData>
get(W window)
-
-
-
Constructor Detail
-
WindowListState
public WindowListState(InternalListState<RowData,W,RowData> windowState)
-
-
Method Detail
-
clear
public void clear(W window)
Description copied from interface:WindowState
Removes the value mapped under current key and the given window.- Specified by:
clear
in interfaceWindowState<W>
-
add
public void add(W window, RowData value) throws Exception
Updates the operator state accessible by#get(W)
by adding the given value to the list of values. The next time#get(W)
is called (for the same state partition) the returned state will represent the updated list.If null is passed in, the state value will remain unchanged.
- Parameters:
window
- The namespace for the state.value
- The new value for the state.- Throws:
Exception
- Thrown if the system cannot access the state.
-
-