Class WindowValueState<W>
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.window.state.WindowValueState<W>
-
- All Implemented Interfaces:
WindowState<W>
public final class WindowValueState<W> extends Object implements WindowState<W>
A wrapper ofValueStatewhich is easier to update based on window namespace.
-
-
Constructor Summary
Constructors Constructor Description WindowValueState(org.apache.flink.runtime.state.internal.InternalValueState<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 voidclear(W window)Removes the value mapped under current key and the given window.voidupdate(W window, org.apache.flink.table.data.RowData value)Update the state with the given value under current key and the given window.org.apache.flink.table.data.RowDatavalue(W window)Returns the current value for the state under current key and the given window.
-
-
-
Constructor Detail
-
WindowValueState
public WindowValueState(org.apache.flink.runtime.state.internal.InternalValueState<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>
-
value
public org.apache.flink.table.data.RowData value(W window) throws IOException
Returns the current value for the state under current key and the given window.- Throws:
IOException
-
update
public void update(W window, org.apache.flink.table.data.RowData value) throws IOException
Update the state with the given value under current key and the given window.- Parameters:
window- the window namespace.value- the new value for the state.- Throws:
IOException
-
-