Class WindowListAsyncState<W>
java.lang.Object
org.apache.flink.table.runtime.operators.window.tvf.asyncprocessing.state.WindowListAsyncState<W>
- All Implemented Interfaces:
WindowAsyncState<W>
A wrapper of
ListState which is easier to update based on window namespace.-
Constructor Summary
ConstructorsConstructorDescriptionWindowListAsyncState(org.apache.flink.runtime.state.v2.internal.InternalListState<org.apache.flink.table.data.RowData, W, org.apache.flink.table.data.RowData> windowState) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.api.common.state.v2.StateFuture<Void>Updates the operator state accessible byasyncGet(W)by adding the given value to the list of values.org.apache.flink.api.common.state.v2.StateFuture<Void>asyncClear(W window) Removes the value mapped under current key and the given window.org.apache.flink.api.common.state.v2.StateFuture<org.apache.flink.api.common.state.v2.StateIterator<org.apache.flink.table.data.RowData>>
-
Constructor Details
-
WindowListAsyncState
public WindowListAsyncState(org.apache.flink.runtime.state.v2.internal.InternalListState<org.apache.flink.table.data.RowData, W, org.apache.flink.table.data.RowData> windowState)
-
-
Method Details
-
asyncClear
Description copied from interface:WindowAsyncStateRemoves the value mapped under current key and the given window.- Specified by:
asyncClearin interfaceWindowAsyncState<W>
-
asyncGet
public org.apache.flink.api.common.state.v2.StateFuture<org.apache.flink.api.common.state.v2.StateIterator<org.apache.flink.table.data.RowData>> asyncGet(W window) -
asyncAdd
public org.apache.flink.api.common.state.v2.StateFuture<Void> asyncAdd(W window, org.apache.flink.table.data.RowData value) Updates the operator state accessible byasyncGet(W)by adding the given value to the list of values. The next timeasyncGet(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.
-