Class AbstractListState<K,​N,​V>

  • Type Parameters:
    K - The type of key the state is associated to.
    V - The type of values kept internally in state.
    All Implemented Interfaces:
    org.apache.flink.api.common.state.v2.AppendingState<V,​org.apache.flink.api.common.state.v2.StateIterator<V>,​Iterable<V>>, org.apache.flink.api.common.state.v2.ListState<V>, org.apache.flink.api.common.state.v2.MergingState<V,​org.apache.flink.api.common.state.v2.StateIterator<V>,​Iterable<V>>, org.apache.flink.api.common.state.v2.State, InternalAppendingState<K,​N,​V,​V,​org.apache.flink.api.common.state.v2.StateIterator<V>,​Iterable<V>>, InternalKeyedState<K,​N,​V>, InternalListState<K,​N,​V>, InternalMergingState<K,​N,​V,​V,​org.apache.flink.api.common.state.v2.StateIterator<V>,​Iterable<V>>, InternalPartitionedState<N>

    public class AbstractListState<K,​N,​V>
    extends AbstractKeyedState<K,​N,​V>
    implements InternalListState<K,​N,​V>
    A default implementation of ListState which delegates all async requests to StateRequestHandler.
    • Constructor Detail

      • AbstractListState

        public AbstractListState​(StateRequestHandler stateRequestHandler,
                                 org.apache.flink.api.common.typeutils.TypeSerializer<V> serializer)
    • Method Detail

      • asyncGet

        public org.apache.flink.api.common.state.v2.StateFuture<org.apache.flink.api.common.state.v2.StateIterator<V>> asyncGet()
        Specified by:
        asyncGet in interface org.apache.flink.api.common.state.v2.AppendingState<K,​N,​V>
      • asyncAdd

        public org.apache.flink.api.common.state.v2.StateFuture<Void> asyncAdd​(V value)
        Specified by:
        asyncAdd in interface org.apache.flink.api.common.state.v2.AppendingState<K,​N,​V>
      • asyncUpdate

        public org.apache.flink.api.common.state.v2.StateFuture<Void> asyncUpdate​(List<V> values)
        Specified by:
        asyncUpdate in interface org.apache.flink.api.common.state.v2.ListState<K>
      • asyncAddAll

        public org.apache.flink.api.common.state.v2.StateFuture<Void> asyncAddAll​(List<V> values)
        Specified by:
        asyncAddAll in interface org.apache.flink.api.common.state.v2.ListState<K>
      • get

        public Iterable<V> get()
        Specified by:
        get in interface org.apache.flink.api.common.state.v2.AppendingState<K,​N,​V>
      • add

        public void add​(V value)
        Specified by:
        add in interface org.apache.flink.api.common.state.v2.AppendingState<K,​N,​V>
      • update

        public void update​(List<V> values)
        Specified by:
        update in interface org.apache.flink.api.common.state.v2.ListState<K>
      • addAll

        public void addAll​(List<V> values)
        Specified by:
        addAll in interface org.apache.flink.api.common.state.v2.ListState<K>
      • asyncMergeNamespaces

        public org.apache.flink.api.common.state.v2.StateFuture<Void> asyncMergeNamespaces​(N target,
                                                                                           Collection<N> sources)
        Description copied from interface: InternalMergingState
        Merges the state of the current key for the given source namespaces into the state of the target namespace.
        Specified by:
        asyncMergeNamespaces in interface InternalMergingState<K,​N,​V,​V,​org.apache.flink.api.common.state.v2.StateIterator<V>,​Iterable<V>>
        Parameters:
        target - The target namespace where the merged state should be stored.
        sources - The source namespaces whose state should be merged.
      • mergeNamespaces

        public void mergeNamespaces​(N target,
                                    Collection<N> sources)
        Description copied from interface: InternalMergingState
        Merges the state of the current key for the given source namespaces into the state of the target namespace.
        Specified by:
        mergeNamespaces in interface InternalMergingState<K,​N,​V,​V,​org.apache.flink.api.common.state.v2.StateIterator<V>,​Iterable<V>>
        Parameters:
        target - The target namespace where the merged state should be stored.
        sources - The source namespaces whose state should be merged.