Package org.apache.flink.streaming.api
Class SimpleTimerService
java.lang.Object
org.apache.flink.streaming.api.SimpleTimerService
- All Implemented Interfaces:
TimerService
Implementation of
TimerService that uses a InternalTimerService.-
Field Summary
Fields inherited from interface org.apache.flink.streaming.api.TimerService
UNSUPPORTED_DELETE_TIMER_MSG, UNSUPPORTED_REGISTER_TIMER_MSG -
Constructor Summary
ConstructorsConstructorDescriptionSimpleTimerService(InternalTimerService<VoidNamespace> internalTimerService) -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the current processing time.longReturns the current event-time watermark.voiddeleteEventTimeTimer(long time) Deletes the event-time timer with the given trigger time.voiddeleteProcessingTimeTimer(long time) Deletes the processing-time timer with the given trigger time.voidregisterEventTimeTimer(long time) Registers a timer to be fired when the event time watermark passes the given time.voidregisterProcessingTimeTimer(long time) Registers a timer to be fired when processing time passes the given time.
-
Constructor Details
-
SimpleTimerService
-
-
Method Details
-
currentProcessingTime
public long currentProcessingTime()Description copied from interface:TimerServiceReturns the current processing time.- Specified by:
currentProcessingTimein interfaceTimerService
-
currentWatermark
public long currentWatermark()Description copied from interface:TimerServiceReturns the current event-time watermark.- Specified by:
currentWatermarkin interfaceTimerService
-
registerProcessingTimeTimer
public void registerProcessingTimeTimer(long time) Description copied from interface:TimerServiceRegisters 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
KeyedStreamthen that context will also be active when you receive the timer notification.- Specified by:
registerProcessingTimeTimerin interfaceTimerService
-
registerEventTimeTimer
public void registerEventTimeTimer(long time) Description copied from interface:TimerServiceRegisters 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
KeyedStreamthen that context will also be active when you receive the timer notification.- Specified by:
registerEventTimeTimerin interfaceTimerService
-
deleteProcessingTimeTimer
public void deleteProcessingTimeTimer(long time) Description copied from interface:TimerServiceDeletes 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:
deleteProcessingTimeTimerin interfaceTimerService
-
deleteEventTimeTimer
public void deleteEventTimeTimer(long time) Description copied from interface:TimerServiceDeletes 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:
deleteEventTimeTimerin interfaceTimerService
-