Class ImmutableMapState<K,V>
- java.lang.Object
-
- org.apache.flink.queryablestate.client.state.ImmutableMapState<K,V>
-
- All Implemented Interfaces:
org.apache.flink.api.common.state.MapState<K,V>,org.apache.flink.api.common.state.State
public final class ImmutableMapState<K,V> extends Object implements org.apache.flink.api.common.state.MapState<K,V>
A read-onlyMapStatethat does not allow for modifications.This is the result returned when querying Flink's keyed state using the
Queryable State Clientand providing anMapStateDescriptor.
-
-
Field Summary
Fields Modifier and Type Field Description protected static UnsupportedOperationExceptionMODIFICATION_ATTEMPT_ERROR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontains(K key)static <K,V,T,S extends org.apache.flink.api.common.state.State>
ScreateState(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 aCollections.unmodifiableSet(Set).Vget(K key)booleanisEmpty()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 aCollections.unmodifiableSet(Set).voidput(K key, V value)voidputAll(Map<K,V> map)voidremove(K key)Iterable<V>values()Returns all the values in the state in aCollections.unmodifiableCollection(Collection).
-
-
-
Field Detail
-
MODIFICATION_ATTEMPT_ERROR
protected static final UnsupportedOperationException MODIFICATION_ATTEMPT_ERROR
-
-
Method Detail
-
remove
public void remove(K key)
-
contains
public boolean contains(K key)
-
entries
public Iterable<Map.Entry<K,V>> entries()
Returns all the mappings in the state in aCollections.unmodifiableSet(Set).
-
keys
public Iterable<K> keys()
Returns all the keys in the state in aCollections.unmodifiableSet(Set).
-
values
public Iterable<V> values()
Returns all the values in the state in aCollections.unmodifiableCollection(Collection).
-
iterator
public Iterator<Map.Entry<K,V>> iterator()
Iterates over all the mappings in the state. The iterator cannot remove elements.
-
isEmpty
public boolean isEmpty()
-
clear
public void clear()
- Specified by:
clearin interfaceorg.apache.flink.api.common.state.State
-
createState
public 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- Throws:
IOException
-
-