Class BatchExecutionInternalTimeService<K,N>
- java.lang.Object
-
- org.apache.flink.streaming.api.operators.sorted.state.BatchExecutionInternalTimeService<K,N>
-
- All Implemented Interfaces:
InternalTimerService<N>
- Direct Known Subclasses:
BatchExecutionInternalTimeServiceWithAsyncState
public class BatchExecutionInternalTimeService<K,N> extends Object implements InternalTimerService<N>
An implementation of aInternalTimerServicethat manages timers with a single active key at a time. Can be used in a BATCH execution mode.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcurrentProcessingTime()Returns the current processing time.longcurrentWatermark()Returns the current event-time watermark.voiddeleteEventTimeTimer(N namespace, long time)Deletes the timer for the given key and namespace.voiddeleteProcessingTimeTimer(N namespace, long time)Deletes the timer for the given key and namespace.voidforEachEventTimeTimer(org.apache.flink.util.function.BiConsumerWithException<N,Long,Exception> consumer)Performs an action for each registered timer.voidforEachProcessingTimeTimer(org.apache.flink.util.function.BiConsumerWithException<N,Long,Exception> consumer)Performs an action for each registered timer.voidinitializeWatermark(long watermark)Initialize watermark after restore.voidregisterEventTimeTimer(N namespace, long time)Registers a timer to be fired when event time watermark passes the given time.voidregisterProcessingTimeTimer(N namespace, long time)Registers a timer to be fired when processing time passes the given time.voidsetCurrentKey(K currentKey)
-
-
-
Method Detail
-
currentProcessingTime
public long currentProcessingTime()
Description copied from interface:InternalTimerServiceReturns the current processing time.- Specified by:
currentProcessingTimein interfaceInternalTimerService<K>
-
currentWatermark
public long currentWatermark()
Description copied from interface:InternalTimerServiceReturns the current event-time watermark.- Specified by:
currentWatermarkin interfaceInternalTimerService<K>
-
initializeWatermark
public void initializeWatermark(long watermark)
Description copied from interface:InternalTimerServiceInitialize watermark after restore.- Specified by:
initializeWatermarkin interfaceInternalTimerService<K>
-
registerProcessingTimeTimer
public void registerProcessingTimeTimer(N namespace, long time)
Description copied from interface:InternalTimerServiceRegisters a timer to be fired when processing time passes the given time. The namespace you pass here will be provided when the timer fires.- Specified by:
registerProcessingTimeTimerin interfaceInternalTimerService<K>
-
registerEventTimeTimer
public void registerEventTimeTimer(N namespace, long time)
Description copied from interface:InternalTimerServiceRegisters a timer to be fired when event time watermark passes the given time. The namespace you pass here will be provided when the timer fires.- Specified by:
registerEventTimeTimerin interfaceInternalTimerService<K>
-
deleteProcessingTimeTimer
public void deleteProcessingTimeTimer(N namespace, long time)
Description copied from interface:InternalTimerServiceDeletes the timer for the given key and namespace.- Specified by:
deleteProcessingTimeTimerin interfaceInternalTimerService<K>
-
deleteEventTimeTimer
public void deleteEventTimeTimer(N namespace, long time)
Description copied from interface:InternalTimerServiceDeletes the timer for the given key and namespace.- Specified by:
deleteEventTimeTimerin interfaceInternalTimerService<K>
-
forEachEventTimeTimer
public void forEachEventTimeTimer(org.apache.flink.util.function.BiConsumerWithException<N,Long,Exception> consumer)
Description copied from interface:InternalTimerServicePerforms an action for each registered timer. The timer service will set the key context for the timers key before invoking the action.- Specified by:
forEachEventTimeTimerin interfaceInternalTimerService<K>
-
forEachProcessingTimeTimer
public void forEachProcessingTimeTimer(org.apache.flink.util.function.BiConsumerWithException<N,Long,Exception> consumer)
Description copied from interface:InternalTimerServicePerforms an action for each registered timer. The timer service will set the key context for the timers key before invoking the action.- Specified by:
forEachProcessingTimeTimerin interfaceInternalTimerService<K>
-
-