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 TimerService that allows to specify a key and a namespace to which timers should be scoped.

  • Method Details

    • 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(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