Class AbstractMapState<K,N,UK,V>

java.lang.Object
org.apache.flink.runtime.state.v2.AbstractKeyedState<K,N,V>
org.apache.flink.runtime.state.v2.AbstractMapState<K,N,UK,V>
Type Parameters:
K - The type of partitioned key the state is associated to.
UK - The type of user key of this state.
V - The type of values kept internally in state.
All Implemented Interfaces:
org.apache.flink.api.common.state.v2.MapState<UK,V>, org.apache.flink.api.common.state.v2.State, InternalKeyedState<K,N,V>, InternalMapState<K,N,UK,V>, InternalPartitionedState<N>

public class AbstractMapState<K,N,UK,V> extends AbstractKeyedState<K,N,V> implements InternalMapState<K,N,UK,V>
A default implementation of MapState which delegates all async requests to StateRequestHandler.
  • Constructor Details

    • AbstractMapState

      public AbstractMapState(StateRequestHandler stateRequestHandler, org.apache.flink.api.common.state.v2.MapStateDescriptor<UK,V> stateDescriptor)
  • Method Details

    • asyncGet

      public org.apache.flink.api.common.state.v2.StateFuture<V> asyncGet(UK key)
      Specified by:
      asyncGet in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • asyncPut

      public org.apache.flink.api.common.state.v2.StateFuture<Void> asyncPut(UK key, V value)
      Specified by:
      asyncPut in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • asyncPutAll

      public org.apache.flink.api.common.state.v2.StateFuture<Void> asyncPutAll(Map<UK,V> map)
      Specified by:
      asyncPutAll in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • asyncRemove

      public org.apache.flink.api.common.state.v2.StateFuture<Void> asyncRemove(UK key)
      Specified by:
      asyncRemove in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • asyncContains

      public org.apache.flink.api.common.state.v2.StateFuture<Boolean> asyncContains(UK key)
      Specified by:
      asyncContains in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • asyncEntries

      public org.apache.flink.api.common.state.v2.StateFuture<org.apache.flink.api.common.state.v2.StateIterator<Map.Entry<UK,V>>> asyncEntries()
      Specified by:
      asyncEntries in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • asyncKeys

      public org.apache.flink.api.common.state.v2.StateFuture<org.apache.flink.api.common.state.v2.StateIterator<UK>> asyncKeys()
      Specified by:
      asyncKeys in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • asyncValues

      public org.apache.flink.api.common.state.v2.StateFuture<org.apache.flink.api.common.state.v2.StateIterator<V>> asyncValues()
      Specified by:
      asyncValues in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • asyncIsEmpty

      public org.apache.flink.api.common.state.v2.StateFuture<Boolean> asyncIsEmpty()
      Specified by:
      asyncIsEmpty in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • get

      public V get(UK key)
      Specified by:
      get in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • put

      public void put(UK key, V value)
      Specified by:
      put in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • putAll

      public void putAll(Map<UK,V> map)
      Specified by:
      putAll in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • remove

      public void remove(UK key)
      Specified by:
      remove in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • contains

      public boolean contains(UK key)
      Specified by:
      contains in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • entries

      public Iterable<Map.Entry<UK,V>> entries()
      Specified by:
      entries in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • keys

      public Iterable<UK> keys()
      Specified by:
      keys in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • values

      public Iterable<V> values()
      Specified by:
      values in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • iterator

      public Iterator<Map.Entry<UK,V>> iterator()
      Specified by:
      iterator in interface org.apache.flink.api.common.state.v2.MapState<K,N>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.apache.flink.api.common.state.v2.MapState<K,N>