Interface Timers


public interface Timers
Interface for interacting with time.
  • Method Details

    • setTimer

      void setTimer(Instant timestamp, TimeDomain timeDomain)
      Sets a timer to fire when the event time watermark, the current processing time, or the synchronized processing time watermark surpasses a given timestamp.

      See TimeDomain for details on the time domains available.

      Timers are not guaranteed to fire immediately, but will be delivered at some time afterwards.

      An implementation of Timers implicitly scopes timers that are set - they may be scoped to a key and window, or a key, window, and trigger, etc.

      Parameters:
      timestamp - the time at which the timer should be delivered
      timeDomain - the domain that the timestamp applies to
    • setTimer

      void setTimer(Instant timestamp, Instant outputTimestamp, TimeDomain timeDomain)
      Set a timer with outputTimestamp.
    • deleteTimer

      void deleteTimer(Instant timestamp, TimeDomain timeDomain)
      Removes the timer set in this context for the timestamp and timeDomain.
    • currentProcessingTime

      Instant currentProcessingTime()
      Returns the current processing time.
    • currentSynchronizedProcessingTime

      @Nullable Instant currentSynchronizedProcessingTime()
      Returns the current synchronized processing time or null if unknown.
    • currentEventTime

      Instant currentEventTime()
      Returns the current event time.