Interface InternalTimerService<N>
-
- Type Parameters:
N- Type of the namespace to which timers are scoped.
- All Known Implementing Classes:
BatchExecutionInternalTimeService,BatchExecutionInternalTimeServiceWithAsyncState,InternalTimerServiceAsyncImpl,InternalTimerServiceImpl
@Internal public interface InternalTimerService<N>Interface for working with time and timers.This is the internal version of
TimerServicethat allows to specify a key and a namespace to which timers should be scoped.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longcurrentProcessingTime()Returns the current processing time.longcurrentWatermark()Returns the current event-time watermark.voiddeleteEventTimeTimer(N namespace, long time)Deletes the timer for the given key and namespace.voiddeleteProcessingTimeTimer(N namespace, long time)Deletes the timer for the given key and namespace.voidforEachEventTimeTimer(org.apache.flink.util.function.BiConsumerWithException<N,Long,Exception> consumer)Performs an action for each registered timer.voidforEachProcessingTimeTimer(org.apache.flink.util.function.BiConsumerWithException<N,Long,Exception> consumer)Performs an action for each registered timer.voidinitializeWatermark(long watermark)Initialize watermark after restore.voidregisterEventTimeTimer(N namespace, long time)Registers a timer to be fired when event time watermark passes the given time.voidregisterProcessingTimeTimer(N namespace, long time)Registers a timer to be fired when processing time passes the given time.
-
-
-
Method Detail
-
currentProcessingTime
long currentProcessingTime()
Returns the current processing time.
-
currentWatermark
long currentWatermark()
Returns the current event-time watermark.
-
initializeWatermark
void initializeWatermark(long watermark)
Initialize watermark after restore.
-
registerProcessingTimeTimer
void registerProcessingTimeTimer(N namespace, long time)
Registers a timer to be fired when processing time passes the given time. The namespace you pass here will be provided when the timer fires.
-
deleteProcessingTimeTimer
void deleteProcessingTimeTimer(N namespace, long time)
Deletes the timer for the given key and namespace.
-
registerEventTimeTimer
void registerEventTimeTimer(N namespace, long time)
Registers a timer to be fired when event time watermark passes the given time. The namespace you pass here will be provided when the timer fires.
-
deleteEventTimeTimer
void deleteEventTimeTimer(N namespace, long time)
Deletes the timer for the given key and namespace.
-
forEachEventTimeTimer
void forEachEventTimeTimer(org.apache.flink.util.function.BiConsumerWithException<N,Long,Exception> consumer) throws Exception
Performs an action for each registered timer. The timer service will set the key context for the timers key before invoking the action.- Throws:
Exception
-
forEachProcessingTimeTimer
void forEachProcessingTimeTimer(org.apache.flink.util.function.BiConsumerWithException<N,Long,Exception> consumer) throws Exception
Performs an action for each registered timer. The timer service will set the key context for the timers key before invoking the action.- Throws:
Exception
-
-