@Experimental(value=TIMERS) public interface Timers
Modifier and Type | Method and Description |
---|---|
Instant |
currentEventTime()
Returns the current event time.
|
Instant |
currentProcessingTime()
Returns the current processing time.
|
@Nullable Instant |
currentSynchronizedProcessingTime()
Returns the current synchronized processing time or
null if unknown. |
void |
deleteTimer(Instant timestamp,
TimeDomain timeDomain)
Removes the timer set in this context for the
timestamp and timeDomain . |
void |
setTimer(Instant timestamp,
Instant outputTimestamp,
TimeDomain timeDomain)
Set a timer with outputTimestamp.
|
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.
|
void setTimer(Instant timestamp, TimeDomain timeDomain)
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.
timestamp
- the time at which the timer should be deliveredtimeDomain
- the domain that the timestamp
applies tovoid setTimer(Instant timestamp, Instant outputTimestamp, TimeDomain timeDomain)
void deleteTimer(Instant timestamp, TimeDomain timeDomain)
timestamp
and timeDomain
.Instant currentProcessingTime()
@Nullable Instant currentSynchronizedProcessingTime()
null
if unknown.Instant currentEventTime()