public final class WindowListState<W> extends Object implements WindowState<W>
ListState which is easier to update based on window namespace.| Constructor and Description |
|---|
WindowListState(org.apache.flink.runtime.state.internal.InternalListState<org.apache.flink.table.data.RowData,W,org.apache.flink.table.data.RowData> windowState) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(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. |
void |
clear(W window)
Removes the value mapped under current key and the given window.
|
List<org.apache.flink.table.data.RowData> |
get(W window) |
public WindowListState(org.apache.flink.runtime.state.internal.InternalListState<org.apache.flink.table.data.RowData,W,org.apache.flink.table.data.RowData> windowState)
public void clear(W window)
WindowStateclear in interface WindowState<W>public List<org.apache.flink.table.data.RowData> get(W window) throws Exception
Exceptionpublic void add(W window, org.apache.flink.table.data.RowData value) throws Exception
#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.
window - The namespace for the state.value - The new value for the state.Exception - Thrown if the system cannot access the state.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.