Class SimpleTimerService

java.lang.Object
org.apache.flink.streaming.api.SimpleTimerService
All Implemented Interfaces:
TimerService

@Internal public class SimpleTimerService extends Object implements TimerService
Implementation of TimerService that uses a InternalTimerService.
  • Constructor Details

  • Method Details

    • currentProcessingTime

      public long currentProcessingTime()
      Description copied from interface: TimerService
      Returns the current processing time.
      Specified by:
      currentProcessingTime in interface TimerService
    • currentWatermark

      public long currentWatermark()
      Description copied from interface: TimerService
      Returns the current event-time watermark.
      Specified by:
      currentWatermark in interface TimerService
    • registerProcessingTimeTimer

      public void registerProcessingTimeTimer(long time)
      Description copied from interface: TimerService
      Registers a timer to be fired when processing time passes the given time.

      Timers can internally be scoped to keys and/or windows. When you set a timer in a keyed context, such as in an operation on KeyedStream then that context will also be active when you receive the timer notification.

      Specified by:
      registerProcessingTimeTimer in interface TimerService
    • registerEventTimeTimer

      public void registerEventTimeTimer(long time)
      Description copied from interface: TimerService
      Registers a timer to be fired when the event time watermark passes the given time.

      Timers can internally be scoped to keys and/or windows. When you set a timer in a keyed context, such as in an operation on KeyedStream then that context will also be active when you receive the timer notification.

      Specified by:
      registerEventTimeTimer in interface TimerService
    • deleteProcessingTimeTimer

      public void deleteProcessingTimeTimer(long time)
      Description copied from interface: TimerService
      Deletes the processing-time timer with the given trigger time. This method has only an effect if such a timer was previously registered and did not already expire.

      Timers can internally be scoped to keys and/or windows. When you delete a timer, it is removed from the current keyed context.

      Specified by:
      deleteProcessingTimeTimer in interface TimerService
    • deleteEventTimeTimer

      public void deleteEventTimeTimer(long time)
      Description copied from interface: TimerService
      Deletes the event-time timer with the given trigger time. This method has only an effect if such a timer was previously registered and did not already expire.

      Timers can internally be scoped to keys and/or windows. When you delete a timer, it is removed from the current keyed context.

      Specified by:
      deleteEventTimeTimer in interface TimerService