public final class ImmutableMapState<K,V> extends Object implements org.apache.flink.api.common.state.MapState<K,V>
MapState that does not allow for modifications.
This is the result returned when querying Flink's keyed state using the Queryable State Client and providing
an MapStateDescriptor.
| Modifier and Type | Field and Description |
|---|---|
protected static UnsupportedOperationException |
MODIFICATION_ATTEMPT_ERROR |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
contains(K key) |
static <K,V,T,S extends org.apache.flink.api.common.state.State> |
createState(org.apache.flink.api.common.state.StateDescriptor<S,T> stateDescriptor,
byte[] serializedState) |
Iterable<Map.Entry<K,V>> |
entries()
Returns all the mappings in the state in a
Collections.unmodifiableSet(Set). |
V |
get(K key) |
boolean |
isEmpty() |
Iterator<Map.Entry<K,V>> |
iterator()
Iterates over all the mappings in the state.
|
Iterable<K> |
keys()
Returns all the keys in the state in a
Collections.unmodifiableSet(Set). |
void |
put(K key,
V value) |
void |
putAll(Map<K,V> map) |
void |
remove(K key) |
Iterable<V> |
values()
Returns all the values in the state in a
Collections.unmodifiableCollection(Collection). |
protected static final UnsupportedOperationException MODIFICATION_ATTEMPT_ERROR
public void remove(K key)
public boolean contains(K key)
public Iterable<Map.Entry<K,V>> entries()
Collections.unmodifiableSet(Set).public Iterable<K> keys()
Collections.unmodifiableSet(Set).public Iterable<V> values()
Collections.unmodifiableCollection(Collection).public Iterator<Map.Entry<K,V>> iterator()
public boolean isEmpty()
public void clear()
clear in interface org.apache.flink.api.common.state.Statepublic static <K,V,T,S extends org.apache.flink.api.common.state.State> S createState(org.apache.flink.api.common.state.StateDescriptor<S,T> stateDescriptor,
byte[] serializedState)
throws IOException
IOExceptionCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.