Package org.apache.flink.streaming.api
Class SimpleTimerService
- java.lang.Object
-
- org.apache.flink.streaming.api.SimpleTimerService
-
- All Implemented Interfaces:
TimerService
@Internal public class SimpleTimerService extends Object implements TimerService
Implementation ofTimerService
that uses aInternalTimerService
.
-
-
Field Summary
-
Fields inherited from interface org.apache.flink.streaming.api.TimerService
UNSUPPORTED_DELETE_TIMER_MSG, UNSUPPORTED_REGISTER_TIMER_MSG
-
-
Constructor Summary
Constructors Constructor Description SimpleTimerService(InternalTimerService<VoidNamespace> internalTimerService)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Constructor Detail
-
SimpleTimerService
public SimpleTimerService(InternalTimerService<VoidNamespace> internalTimerService)
-
-
Method Detail
-
currentProcessingTime
public long currentProcessingTime()
Description copied from interface:TimerService
Returns the current processing time.- Specified by:
currentProcessingTime
in interfaceTimerService
-
currentWatermark
public long currentWatermark()
Description copied from interface:TimerService
Returns the current event-time watermark.- Specified by:
currentWatermark
in interfaceTimerService
-
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 interfaceTimerService
-
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 interfaceTimerService
-
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 interfaceTimerService
-
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 interfaceTimerService
-
-