Class AbstractKeyedState<K,N,V>

java.lang.Object
org.apache.flink.runtime.state.v2.AbstractKeyedState<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.State, InternalKeyedState<K,N,V>, InternalPartitionedState<N>
Direct Known Subclasses:
AbstractAggregatingState, AbstractListState, AbstractMapState, AbstractReducingState, AbstractValueState

@Internal public abstract class AbstractKeyedState<K,N,V> extends Object implements InternalKeyedState<K,N,V>
The AbstractKeyedState is the root of the abstract state implementation hierarchy, similar to the State being the root of the public API state hierarchy.

The public API state hierarchy is intended to be programmed against by Flink applications. The internal state hierarchy holds all the auxiliary methods that communicates with AsyncExecutionController and not intended to be used by user applications.

  • Field Details

  • Constructor Details

    • AbstractKeyedState

      public AbstractKeyedState(StateRequestHandler stateRequestHandler, org.apache.flink.api.common.state.v2.StateDescriptor<V> stateDescriptor)
      Creates a new AbstractKeyedState with the given asyncExecutionController and stateDescriptor.
  • Method Details

    • handleRequest

      protected final <IN, OUT> org.apache.flink.api.common.state.v2.StateFuture<OUT> handleRequest(StateRequestType stateRequestType, IN payload)
      Submit a state request to AEC.
      Parameters:
      stateRequestType - the type of this request.
      payload - the payload input for this request.
      Returns:
      the state future.
    • handleRequestSync

      protected final <IN, OUT> OUT handleRequestSync(StateRequestType stateRequestType, IN payload)
    • setCurrentNamespace

      public void setCurrentNamespace(N namespace)
      Description copied from interface: InternalPartitionedState
      Set current namespace and access state under specified namespace afterward.
      Specified by:
      setCurrentNamespace in interface InternalPartitionedState<K>
      Parameters:
      namespace - the specified namespace
    • asyncClear

      public final org.apache.flink.api.common.state.v2.StateFuture<Void> asyncClear()
      Specified by:
      asyncClear in interface org.apache.flink.api.common.state.v2.State
    • clear

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

      public org.apache.flink.api.common.state.v2.StateDescriptor<V> getStateDescriptor()
      Return specific StateDescriptor.
    • getValueSerializer

      public org.apache.flink.api.common.typeutils.TypeSerializer<V> getValueSerializer()
      Return related value serializer.
    • getStateRequestHandler

      public StateRequestHandler getStateRequestHandler()