Package org.apache.flink.runtime.state
Interface KeyedStateFactory
-
- All Known Subinterfaces:
CheckpointableKeyedStateBackend<K>
,KeyedStateBackend<K>
,TestableKeyedStateBackend<K>
- All Known Implementing Classes:
AbstractKeyedStateBackend
,BatchExecutionKeyedStateBackend
,ChangelogKeyedStateBackend
,ForStSyncKeyedStateBackend
,HeapKeyedStateBackend
,RocksDBKeyedStateBackend
public interface KeyedStateFactory
This factory produces concrete internal state objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <N,SV,S extends State,IS extends S>
IScreateOrUpdateInternalState(TypeSerializer<N> namespaceSerializer, StateDescriptor<S,SV> stateDesc)
Creates or updates internal state and returns a newInternalKvState
.<N,SV,SEV,S extends State,IS extends S>
IScreateOrUpdateInternalState(TypeSerializer<N> namespaceSerializer, StateDescriptor<S,SV> stateDesc, StateSnapshotTransformer.StateSnapshotTransformFactory<SEV> snapshotTransformFactory)
Creates or updates internal state and returns a newInternalKvState
.default <N,SV,SEV,S extends State,IS extends S>
IScreateOrUpdateInternalState(TypeSerializer<N> namespaceSerializer, StateDescriptor<S,SV> stateDesc, StateSnapshotTransformer.StateSnapshotTransformFactory<SEV> snapshotTransformFactory, boolean allowFutureMetadataUpdates)
Creates or updates internal state and returns a newInternalKvState
.
-
-
-
Method Detail
-
createOrUpdateInternalState
@Nonnull default <N,SV,S extends State,IS extends S> IS createOrUpdateInternalState(@Nonnull TypeSerializer<N> namespaceSerializer, @Nonnull StateDescriptor<S,SV> stateDesc) throws Exception
Creates or updates internal state and returns a newInternalKvState
.- Type Parameters:
N
- The type of the namespace.SV
- The type of the stored state value.S
- The type of the public API state.IS
- The type of internal state.- Parameters:
namespaceSerializer
- TypeSerializer for the state namespace.stateDesc
- TheStateDescriptor
that contains the name of the state.- Throws:
Exception
-
createOrUpdateInternalState
@Nonnull <N,SV,SEV,S extends State,IS extends S> IS createOrUpdateInternalState(@Nonnull TypeSerializer<N> namespaceSerializer, @Nonnull StateDescriptor<S,SV> stateDesc, @Nonnull StateSnapshotTransformer.StateSnapshotTransformFactory<SEV> snapshotTransformFactory) throws Exception
Creates or updates internal state and returns a newInternalKvState
.- Type Parameters:
N
- The type of the namespace.SV
- The type of the stored state value.SEV
- The type of the stored state value or entry for collection types (list or map).S
- The type of the public API state.IS
- The type of internal state.- Parameters:
namespaceSerializer
- TypeSerializer for the state namespace.stateDesc
- TheStateDescriptor
that contains the name of the state.snapshotTransformFactory
- factory of state snapshot transformer.- Throws:
Exception
-
createOrUpdateInternalState
@Nonnull default <N,SV,SEV,S extends State,IS extends S> IS createOrUpdateInternalState(@Nonnull TypeSerializer<N> namespaceSerializer, @Nonnull StateDescriptor<S,SV> stateDesc, @Nonnull StateSnapshotTransformer.StateSnapshotTransformFactory<SEV> snapshotTransformFactory, boolean allowFutureMetadataUpdates) throws Exception
Creates or updates internal state and returns a newInternalKvState
.- Type Parameters:
N
- The type of the namespace.SV
- The type of the stored state value.SEV
- The type of the stored state value or entry for collection types (list or map).S
- The type of the public API state.IS
- The type of internal state.- Parameters:
namespaceSerializer
- TypeSerializer for the state namespace.stateDesc
- TheStateDescriptor
that contains the name of the state.snapshotTransformFactory
- factory of state snapshot transformer.allowFutureMetadataUpdates
- whether allow metadata to update in the future or not.- Throws:
Exception
-
-