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>
TheAbstractKeyedStateis the root of the abstract state implementation hierarchy, similar to theStatebeing 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
AsyncExecutionControllerand not intended to be used by user applications.
-
-
Field Summary
Fields Modifier and Type Field Description protected StateRequestHandlerstateRequestHandler
-
Constructor Summary
Constructors Constructor Description AbstractKeyedState(StateRequestHandler stateRequestHandler, org.apache.flink.api.common.typeutils.TypeSerializer<V> valueSerializer)Creates a new AbstractKeyedState with the given asyncExecutionController and stateDescriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.flink.api.common.state.v2.StateFuture<Void>asyncClear()voidclear()StateRequestHandlergetStateRequestHandler()org.apache.flink.api.common.typeutils.TypeSerializer<V>getValueSerializer()Return related value serializer.protected <IN,OUT>
org.apache.flink.api.common.state.v2.StateFuture<OUT>handleRequest(StateRequestType stateRequestType, IN payload)Submit a state request to AEC.protected <IN,OUT>
OUThandleRequestSync(StateRequestType stateRequestType, IN payload)voidsetCurrentNamespace(N namespace)Set current namespace and access state under specified namespace afterward.
-
-
-
Field Detail
-
stateRequestHandler
protected final StateRequestHandler stateRequestHandler
-
-
Constructor Detail
-
AbstractKeyedState
public AbstractKeyedState(StateRequestHandler stateRequestHandler, org.apache.flink.api.common.typeutils.TypeSerializer<V> valueSerializer)
Creates a new AbstractKeyedState with the given asyncExecutionController and stateDescriptor.
-
-
Method Detail
-
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:InternalPartitionedStateSet current namespace and access state under specified namespace afterward.- Specified by:
setCurrentNamespacein interfaceInternalPartitionedState<K>- Parameters:
namespace- the specified namespace
-
asyncClear
public final org.apache.flink.api.common.state.v2.StateFuture<Void> 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
-
getValueSerializer
public org.apache.flink.api.common.typeutils.TypeSerializer<V> getValueSerializer()
Return related value serializer.
-
getStateRequestHandler
public StateRequestHandler getStateRequestHandler()
-
-