Class InternalTimerServiceAsyncImpl<K,N>
java.lang.Object
org.apache.flink.streaming.api.operators.InternalTimerServiceImpl<K,N>
org.apache.flink.streaming.api.operators.InternalTimerServiceAsyncImpl<K,N>
- Type Parameters:
K- Type of timer's key.N- Type of the namespace to which timers are scoped.
- All Implemented Interfaces:
InternalTimerService<N>
An implementation of
InternalTimerService that is used by AbstractAsyncStateStreamOperator. The timer
service will set RecordContext for the timers before invoking action to preserve the
execution order between timer firing and records processing.- See Also:
-
Field Summary
Fields inherited from class org.apache.flink.streaming.api.operators.InternalTimerServiceImpl
cancellationContext, currentWatermark, eventTimeTimersQueue, keyContext, nextTimer, processingTimeService, processingTimeTimersQueue, taskIOMetricGroup, triggerTarget -
Method Summary
Modifier and TypeMethodDescriptionvoidadvanceWatermark(long time) Advance one watermark, this will fire some event timers.protected voidforeachTimer(org.apache.flink.util.function.BiConsumerWithException<N, Long, Exception> consumer, KeyGroupedInternalPriorityQueue<TimerHeapInternalTimer<K, N>> queue) Iterator each timer in the queue, and invoke the consumer.voidsetup(AsyncExecutionController<K> asyncExecutionController) Methods inherited from class org.apache.flink.streaming.api.operators.InternalTimerServiceImpl
currentProcessingTime, currentWatermark, deleteEventTimeTimer, deleteProcessingTimeTimer, forEachEventTimeTimer, forEachProcessingTimeTimer, getKeySerializer, getNamespaceSerializer, numEventTimeTimers, numEventTimeTimers, numProcessingTimeTimers, numProcessingTimeTimers, registerEventTimeTimer, registerProcessingTimeTimer, restoreTimersForKeyGroup, snapshotTimersForKeyGroup, startTimerService, tryAdvanceWatermark
-
Method Details
-
setup
-
advanceWatermark
Advance one watermark, this will fire some event timers.- Overrides:
advanceWatermarkin classInternalTimerServiceImpl<K,N> - Parameters:
time- the time in watermark.- Throws:
Exception
-
foreachTimer
protected void foreachTimer(org.apache.flink.util.function.BiConsumerWithException<N, Long, throws ExceptionException> consumer, KeyGroupedInternalPriorityQueue<TimerHeapInternalTimer<K, N>> queue) Iterator each timer in the queue, and invoke the consumer. This function is mainly used by state-processor-API. TODO: Ensure state-processor-API that only uses sync state API.- Overrides:
foreachTimerin classInternalTimerServiceImpl<K,N> - Throws:
Exception
-