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>
TheAbstractKeyedState
is the root of the abstract state implementation hierarchy, similar to theState
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 Modifier and Type Field Description protected StateRequestHandler
stateRequestHandler
-
Constructor Summary
Constructors Constructor Description AbstractKeyedState(StateRequestHandler stateRequestHandler, org.apache.flink.api.common.state.v2.StateDescriptor<V> stateDescriptor)
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()
void
clear()
org.apache.flink.api.common.state.v2.StateDescriptor<V>
getStateDescriptor()
Return specificStateDescriptor
.StateRequestHandler
getStateRequestHandler()
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)
void
setCurrentNamespace(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.state.v2.StateDescriptor<V> stateDescriptor)
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:InternalPartitionedState
Set current namespace and access state under specified namespace afterward.- Specified by:
setCurrentNamespace
in interfaceInternalPartitionedState<K>
- Parameters:
namespace
- the specified namespace
-
asyncClear
public final org.apache.flink.api.common.state.v2.StateFuture<Void> asyncClear()
- Specified by:
asyncClear
in interfaceorg.apache.flink.api.common.state.v2.State
-
clear
public final void clear()
- Specified by:
clear
in interfaceorg.apache.flink.api.common.state.v2.State
-
getStateDescriptor
public org.apache.flink.api.common.state.v2.StateDescriptor<V> getStateDescriptor()
Return specificStateDescriptor
.
-
getValueSerializer
public org.apache.flink.api.common.typeutils.TypeSerializer<V> getValueSerializer()
Return related value serializer.
-
getStateRequestHandler
public StateRequestHandler getStateRequestHandler()
-
-