Package org.apache.flink.streaming.api
Interface TimerService
-
- All Known Implementing Classes:
LazyTimerService
,SimpleTimerService
,TableStreamOperator.ContextImpl
@PublicEvolving public interface TimerService
Interface for working with time and timers.
-
-
Field Summary
Fields Modifier and Type Field Description static String
UNSUPPORTED_DELETE_TIMER_MSG
Error string forUnsupportedOperationException
on deleting timers.static String
UNSUPPORTED_REGISTER_TIMER_MSG
Error string forUnsupportedOperationException
on registering timers.
-
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(long time)
Deletes the event-time timer with the given trigger time.void
deleteProcessingTimeTimer(long time)
Deletes the processing-time timer with the given trigger time.void
registerEventTimeTimer(long time)
Registers a timer to be fired when the event time watermark passes the given time.void
registerProcessingTimeTimer(long time)
Registers a timer to be fired when processing time passes the given time.
-
-
-
Field Detail
-
UNSUPPORTED_REGISTER_TIMER_MSG
static final String UNSUPPORTED_REGISTER_TIMER_MSG
Error string forUnsupportedOperationException
on registering timers.- See Also:
- Constant Field Values
-
UNSUPPORTED_DELETE_TIMER_MSG
static final String UNSUPPORTED_DELETE_TIMER_MSG
Error string forUnsupportedOperationException
on deleting timers.- See Also:
- Constant Field Values
-
-
Method Detail
-
currentProcessingTime
long currentProcessingTime()
Returns the current processing time.
-
currentWatermark
long currentWatermark()
Returns the current event-time watermark.
-
registerProcessingTimeTimer
void registerProcessingTimeTimer(long time)
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.
-
registerEventTimeTimer
void registerEventTimeTimer(long time)
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.
-
deleteProcessingTimeTimer
void deleteProcessingTimeTimer(long time)
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.
-
deleteEventTimeTimer
void deleteEventTimeTimer(long time)
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.
-
-