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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractKeyedState(StateRequestHandler stateRequestHandler, org.apache.flink.api.common.state.v2.StateDescriptor<V> stateDescriptor) Creates a new AbstractKeyedState with the given asyncExecutionController and stateDescriptor. -
Method Summary
Modifier and TypeMethodDescriptionfinal org.apache.flink.api.common.state.v2.StateFuture<Void>final voidclear()org.apache.flink.api.common.state.v2.StateDescriptor<V>Return specificStateDescriptor.org.apache.flink.api.common.typeutils.TypeSerializer<V>Return related value serializer.protected final <IN,OUT> org.apache.flink.api.common.state.v2.StateFuture<OUT> handleRequest(StateRequestType stateRequestType, IN payload) Submit a state request to AEC.protected final <IN,OUT> OUT handleRequestSync(StateRequestType stateRequestType, IN payload) voidsetCurrentNamespace(N namespace) Set current namespace and access state under specified namespace afterward.
-
Field Details
-
stateRequestHandler
-
-
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
-
setCurrentNamespace
Description copied from interface:InternalPartitionedStateSet current namespace and access state under specified namespace afterward.- Specified by:
setCurrentNamespacein interfaceInternalPartitionedState<K>- Parameters:
namespace- the specified namespace
-
asyncClear
- Specified by:
asyncClearin interfaceorg.apache.flink.api.common.state.v2.State
-
clear
public final void clear()- Specified by:
clearin interfaceorg.apache.flink.api.common.state.v2.State
-
getStateDescriptor
Return specificStateDescriptor. -
getValueSerializer
Return related value serializer. -
getStateRequestHandler
-