Interface InternalListState<K,N,T>

Type Parameters:
K - The type of key the state is associated to
N - The type of the namespace
T - The type of elements in the list
All Superinterfaces:
org.apache.flink.api.common.state.AppendingState<T,Iterable<T>>, InternalAppendingState<K,N,T,List<T>,Iterable<T>>, InternalKvState<K,N,List<T>>, InternalMergingState<K,N,T,List<T>,Iterable<T>>, org.apache.flink.api.common.state.ListState<T>, org.apache.flink.api.common.state.MergingState<T,Iterable<T>>, org.apache.flink.api.common.state.State

public interface InternalListState<K,N,T> extends InternalMergingState<K,N,T,List<T>,Iterable<T>>, org.apache.flink.api.common.state.ListState<T>
The peer to the ListState in the internal state type hierarchy.

See InternalKvState for a description of the internal state hierarchy.

  • Method Details

    • update

      void update(List<T> values) throws Exception
      Updates the operator state accessible by AppendingState.get() by updating existing values to the given list of values. The next time AppendingState.get() is called (for the same state partition) the returned state will represent the updated list.

      If an empty list is passed in, the state value will be null

      Null value passed in or any null value in list is not allowed.

      Specified by:
      update in interface org.apache.flink.api.common.state.ListState<K>
      Parameters:
      values - The new values for the state.
      Throws:
      Exception - The method may forward exception thrown internally (by I/O or functions, or sanity check for null value).
    • addAll

      void addAll(List<T> values) throws Exception
      Updates the operator state accessible by AppendingState.get() by adding the given values to existing list of values. The next time AppendingState.get() is called (for the same state partition) the returned state will represent the updated list.

      If an empty list is passed in, the state value remains unchanged

      Null value passed in or any null value in list is not allowed.

      Specified by:
      addAll in interface org.apache.flink.api.common.state.ListState<K>
      Parameters:
      values - The new values to be added to the state.
      Throws:
      Exception - The method may forward exception thrown internally (by I/O or functions, or sanity check for null value).