K - The type of keys used for the timers and the registry.@Internal
public interface InternalTimeServiceManager<K>
NOTE: These services are only available to keyed operators.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
InternalTimeServiceManager.Provider
A provider pattern for creating an instance of a
InternalTimeServiceManager. |
static interface |
InternalTimeServiceManager.ShouldStopAdvancingFn
Signals whether the watermark should continue advancing.
|
| Modifier and Type | Method and Description |
|---|---|
void |
advanceWatermark(Watermark watermark)
Advances the Watermark of all managed
timer services,
potentially firing event time timers. |
<N> InternalTimerService<N> |
getAsyncInternalTimerService(String name,
org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
Triggerable<K,N> triggerable,
org.apache.flink.runtime.asyncprocessing.AsyncExecutionController<K> asyncExecutionController)
Creates an
InternalTimerServiceAsyncImpl for handling a group of timers identified by
the given name. |
<N> InternalTimerService<N> |
getInternalTimerService(String name,
org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
Triggerable<K,N> triggerable)
Creates an
InternalTimerService for handling a group of timers identified by the
given name. |
void |
snapshotToRawKeyedState(org.apache.flink.runtime.state.KeyedStateCheckpointOutputStream stateCheckpointOutputStream,
String operatorName)
Snapshots the timers to raw keyed state.
|
boolean |
tryAdvanceWatermark(Watermark watermark,
InternalTimeServiceManager.ShouldStopAdvancingFn shouldStopAdvancingFn)
Try to
advanceWatermark(Watermark), but if InternalTimeServiceManager.ShouldStopAdvancingFn returns
true, stop the advancement and return as soon as possible. |
<N> InternalTimerService<N> getInternalTimerService(String name, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, Triggerable<K,N> triggerable)
InternalTimerService for handling a group of timers identified by the
given name. The timers are scoped to a key and namespace.
When a timer fires the given Triggerable will be invoked.
<N> InternalTimerService<N> getAsyncInternalTimerService(String name, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, Triggerable<K,N> triggerable, org.apache.flink.runtime.asyncprocessing.AsyncExecutionController<K> asyncExecutionController)
InternalTimerServiceAsyncImpl for handling a group of timers identified by
the given name. The timers are scoped to a key and namespace. Mainly used by async
operators.
Some essential order preservation will be added when the given Triggerable is
invoked.
void advanceWatermark(Watermark watermark) throws Exception
timer services,
potentially firing event time timers.Exceptionboolean tryAdvanceWatermark(Watermark watermark, InternalTimeServiceManager.ShouldStopAdvancingFn shouldStopAdvancingFn) throws Exception
advanceWatermark(Watermark), but if InternalTimeServiceManager.ShouldStopAdvancingFn returns
true, stop the advancement and return as soon as possible.void snapshotToRawKeyedState(org.apache.flink.runtime.state.KeyedStateCheckpointOutputStream stateCheckpointOutputStream,
String operatorName)
throws Exception
TODO: This can be removed once heap-based timers are integrated with RocksDB incremental snapshots.
ExceptionCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.