public final class WindowMapState<W,UV> extends Object implements WindowState<W>
MapState which is easier to update based on window namespace.| Constructor and Description |
|---|
WindowMapState(org.apache.flink.runtime.state.internal.InternalMapState<org.apache.flink.table.data.RowData,W,org.apache.flink.table.data.RowData,UV> windowState) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear(W window)
Removes the value mapped under current key and the given window.
|
boolean |
contains(W window,
org.apache.flink.table.data.RowData key)
Returns whether there exists the given mapping.
|
Iterable<Map.Entry<org.apache.flink.table.data.RowData,UV>> |
entries(W window)
Returns all the mappings in the state.
|
UV |
get(W window,
org.apache.flink.table.data.RowData key)
Returns the current value associated with the given key.
|
boolean |
isEmpty(W window)
Returns true if this state contains no key-value mappings, otherwise false.
|
Iterator<Map.Entry<org.apache.flink.table.data.RowData,UV>> |
iterator(W window)
Iterates over all the mappings in the state.
|
Iterable<org.apache.flink.table.data.RowData> |
keys(W window)
Returns all the keys in the state.
|
void |
put(W window,
org.apache.flink.table.data.RowData key,
UV value)
Associates a new value with the given key.
|
void |
putAll(W window,
Map<org.apache.flink.table.data.RowData,UV> map)
Copies all of the mappings from the given map into the state.
|
void |
remove(W window,
org.apache.flink.table.data.RowData key)
Deletes the mapping of the given key.
|
Iterable<UV> |
values(W window)
Returns all the values in the state.
|
public void clear(W window)
WindowStateclear in interface WindowState<W>public UV get(W window, org.apache.flink.table.data.RowData key) throws Exception
key - The key of the mappingException - Thrown if the system cannot access the state.public void put(W window, org.apache.flink.table.data.RowData key, UV value) throws Exception
key - The key of the mappingvalue - The new value of the mappingException - Thrown if the system cannot access the state.public void putAll(W window, Map<org.apache.flink.table.data.RowData,UV> map) throws Exception
map - The mappings to be stored in this stateException - Thrown if the system cannot access the state.public void remove(W window, org.apache.flink.table.data.RowData key) throws Exception
key - The key of the mappingException - Thrown if the system cannot access the state.public boolean contains(W window, org.apache.flink.table.data.RowData key) throws Exception
key - The key of the mappingException - Thrown if the system cannot access the state.public Iterable<Map.Entry<org.apache.flink.table.data.RowData,UV>> entries(W window) throws Exception
Exception - Thrown if the system cannot access the state.public Iterable<org.apache.flink.table.data.RowData> keys(W window) throws Exception
Exception - Thrown if the system cannot access the state.public Iterable<UV> values(W window) throws Exception
Exception - Thrown if the system cannot access the state.public Iterator<Map.Entry<org.apache.flink.table.data.RowData,UV>> iterator(W window) throws Exception
Exception - Thrown if the system cannot access the state.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.