Class HeapBroadcastState<K,V>

java.lang.Object
org.apache.flink.runtime.state.HeapBroadcastState<K,V>
Type Parameters:
K - The key type of the elements in the Broadcast State.
V - The value type of the elements in the Broadcast State.
All Implemented Interfaces:
org.apache.flink.api.common.state.BroadcastState<K,V>, org.apache.flink.api.common.state.ReadOnlyBroadcastState<K,V>, org.apache.flink.api.common.state.State, BackendWritableBroadcastState<K,V>

public class HeapBroadcastState<K,V> extends Object implements BackendWritableBroadcastState<K,V>
A Broadcast State backed a heap-based Map.
  • Method Details

    • setStateMetaInfo

      public void setStateMetaInfo(RegisteredBroadcastStateBackendMetaInfo<K,V> stateMetaInfo)
      Specified by:
      setStateMetaInfo in interface BackendWritableBroadcastState<K,V>
    • getStateMetaInfo

      public RegisteredBroadcastStateBackendMetaInfo<K,V> getStateMetaInfo()
      Specified by:
      getStateMetaInfo in interface BackendWritableBroadcastState<K,V>
    • deepCopy

      public HeapBroadcastState<K,V> deepCopy()
      Specified by:
      deepCopy in interface BackendWritableBroadcastState<K,V>
    • clear

      public void clear()
      Specified by:
      clear in interface org.apache.flink.api.common.state.State
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • write

      public long write(org.apache.flink.core.fs.FSDataOutputStream out) throws IOException
      Specified by:
      write in interface BackendWritableBroadcastState<K,V>
      Throws:
      IOException
    • get

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

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

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

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

      public boolean contains(K key)
      Specified by:
      contains in interface org.apache.flink.api.common.state.ReadOnlyBroadcastState<K,V>
    • iterator

      public Iterator<Map.Entry<K,V>> iterator()
      Specified by:
      iterator in interface org.apache.flink.api.common.state.BroadcastState<K,V>
    • entries

      public Iterable<Map.Entry<K,V>> entries()
      Specified by:
      entries in interface org.apache.flink.api.common.state.BroadcastState<K,V>
    • immutableEntries

      public Iterable<Map.Entry<K,V>> immutableEntries()
      Specified by:
      immutableEntries in interface org.apache.flink.api.common.state.ReadOnlyBroadcastState<K,V>
    • getInternalMapCopySerializer

      @VisibleForTesting public org.apache.flink.api.common.typeutils.base.MapSerializer<K,V> getInternalMapCopySerializer()