Package org.apache.flink.runtime.state
Interface AsyncKeyedStateBackend
-
- All Superinterfaces:
AutoCloseable,Closeable,org.apache.flink.util.Disposable
@Internal public interface AsyncKeyedStateBackend extends org.apache.flink.util.Disposable, Closeable
An async keyed state backend provides methods supporting to access keyed state asynchronously and in batch.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <SV,S extends org.apache.flink.api.common.state.v2.State>
ScreateState(StateDescriptor<SV> stateDesc)Creates and returns a new state.StateExecutorcreateStateExecutor()Creates aStateExecutorwhich supports to execute a batch of state requests asynchronously.voiddispose()voidsetup(StateRequestHandler stateRequestHandler)Initializes with some contexts.
-
-
-
Method Detail
-
setup
void setup(@Nonnull StateRequestHandler stateRequestHandler)
Initializes with some contexts.- Parameters:
stateRequestHandler- which handles state request.
-
createState
@Nonnull <SV,S extends org.apache.flink.api.common.state.v2.State> S createState(@Nonnull StateDescriptor<SV> stateDesc) throws Exception
Creates and returns a new state.- Type Parameters:
SV- The type of the stored state value.S- The type of the public API state.- Parameters:
stateDesc- TheStateDescriptorthat contains the name of the state.- Throws:
Exception- Exceptions may occur during initialization of the state.
-
createStateExecutor
@Nonnull StateExecutor createStateExecutor()
Creates aStateExecutorwhich supports to execute a batch of state requests asynchronously.Notice that the
AsyncKeyedStateBackendis responsible for shutting down the StateExecutors created by itself when they are no longer in use.- Returns:
- a
StateExecutorwhich supports to execute a batch of state requests asynchronously.
-
dispose
void dispose()
- Specified by:
disposein interfaceorg.apache.flink.util.Disposable
-
-