Interface InternalTimerService<N>
-
- Type Parameters:
N
- Type of the namespace to which timers are scoped.
- All Known Implementing Classes:
BatchExecutionInternalTimeService
,InternalTimerServiceAsyncImpl
,InternalTimerServiceImpl
@Internal public interface InternalTimerService<N>
Interface for working with time and timers.This is the internal version of
TimerService
that 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 long
currentProcessingTime()
Returns the current processing time.long
currentWatermark()
Returns the current event-time watermark.void
deleteEventTimeTimer(N namespace, long time)
Deletes the timer for the given key and namespace.void
deleteProcessingTimeTimer(N namespace, long time)
Deletes the timer for the given key and namespace.void
forEachEventTimeTimer(BiConsumerWithException<N,Long,Exception> consumer)
Performs an action for each registered timer.void
forEachProcessingTimeTimer(BiConsumerWithException<N,Long,Exception> consumer)
Performs an action for each registered timer.void
registerEventTimeTimer(N namespace, long time)
Registers a timer to be fired when event time watermark passes the given time.void
registerProcessingTimeTimer(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.
-
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(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
-
-