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 ofListStatewhich is easier to update based on window namespace.
-
-
Constructor Summary
Constructors Constructor Description WindowListState(org.apache.flink.runtime.state.internal.InternalListState<org.apache.flink.table.data.RowData,W,org.apache.flink.table.data.RowData> windowState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(W window, org.apache.flink.table.data.RowData value)Updates the operator state accessible by#get(W)by adding the given value to the list of values.voidclear(W window)Removes the value mapped under current key and the given window.List<org.apache.flink.table.data.RowData>get(W window)
-
-
-
Constructor Detail
-
WindowListState
public WindowListState(org.apache.flink.runtime.state.internal.InternalListState<org.apache.flink.table.data.RowData,W,org.apache.flink.table.data.RowData> windowState)
-
-
Method Detail
-
clear
public void clear(W window)
Description copied from interface:WindowStateRemoves the value mapped under current key and the given window.- Specified by:
clearin interfaceWindowState<W>
-
get
public List<org.apache.flink.table.data.RowData> get(W window) throws Exception
- Throws:
Exception
-
add
public void add(W window, org.apache.flink.table.data.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.
-
-