Interface StreamOperatorStateContext
public interface StreamOperatorStateContext
This interface represents a context from which a stream operator can initialize everything
connected to state such as e.g. backends, raw state, and timer service manager.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the internal timer service manager create by async state backend for the stream operator.Returns the async keyed state backend for the stream operator.Returns non-empty if the states provided by this context are restored from a checkpoint/savepoint.Returns the internal timer service manager for the stream operator.default booleanReturns true if the states provided by this context are restored from a checkpoint/savepoint.Returns the keyed state backend for the stream operator.org.apache.flink.api.common.typeutils.TypeSerializer<?>Returns the key serializer for keyed state backends.Returns the operator state backend for the stream operator.org.apache.flink.util.CloseableIterable<KeyGroupStatePartitionStreamProvider>Returns an iterable to obtain input streams for previously stored keyed state partitions that are assigned to this operator.org.apache.flink.util.CloseableIterable<StatePartitionStreamProvider>Returns an iterable to obtain input streams for previously stored operator state partitions that are assigned to this stream operator.
-
Method Details
-
isRestored
default boolean isRestored()Returns true if the states provided by this context are restored from a checkpoint/savepoint. -
getRestoredCheckpointId
OptionalLong getRestoredCheckpointId()Returns non-empty if the states provided by this context are restored from a checkpoint/savepoint. -
operatorStateBackend
OperatorStateBackend operatorStateBackend()Returns the operator state backend for the stream operator. -
keySerializer
org.apache.flink.api.common.typeutils.TypeSerializer<?> keySerializer()Returns the key serializer for keyed state backends. -
keyedStateBackend
CheckpointableKeyedStateBackend<?> keyedStateBackend()Returns the keyed state backend for the stream operator. This method returns null for non-keyed operators. -
asyncKeyedStateBackend
AsyncKeyedStateBackend<?> asyncKeyedStateBackend()Returns the async keyed state backend for the stream operator. This method returns null for operators which don't support async keyed state backend. -
internalTimerServiceManager
InternalTimeServiceManager<?> internalTimerServiceManager()Returns the internal timer service manager for the stream operator. This method returns null for non-keyed operators. -
asyncInternalTimerServiceManager
InternalTimeServiceManager<?> asyncInternalTimerServiceManager()Returns the internal timer service manager create by async state backend for the stream operator. This method returns null for non-keyed operators. -
rawOperatorStateInputs
org.apache.flink.util.CloseableIterable<StatePartitionStreamProvider> rawOperatorStateInputs()Returns an iterable to obtain input streams for previously stored operator state partitions that are assigned to this stream operator. -
rawKeyedStateInputs
org.apache.flink.util.CloseableIterable<KeyGroupStatePartitionStreamProvider> rawKeyedStateInputs()Returns an iterable to obtain input streams for previously stored keyed state partitions that are assigned to this operator. This method returns null for non-keyed operators.
-