Class SystemProcessingTimeService

    • Method Detail

      • registerTimer

        public ScheduledFuture<?> registerTimer​(long timestamp,
                                                org.apache.flink.api.common.operators.ProcessingTimeService.ProcessingTimeCallback callback)
        Registers a task to be executed no sooner than time timestamp, but without strong guarantees of order.
        Specified by:
        registerTimer in interface org.apache.flink.api.common.operators.ProcessingTimeService
        Parameters:
        timestamp - Time when the task is to be enabled (in processing time)
        callback - The task to be executed
        Returns:
        The future that represents the scheduled task. This always returns some future, even if the timer was shut down
      • scheduleAtFixedRate

        public ScheduledFuture<?> scheduleAtFixedRate​(org.apache.flink.api.common.operators.ProcessingTimeService.ProcessingTimeCallback callback,
                                                      long initialDelay,
                                                      long period)
        Description copied from interface: ProcessingTimeService
        Registers a task to be executed repeatedly at a fixed rate.

        This call behaves similar to ScheduledExecutor.scheduleAtFixedRate(Runnable, long, long, TimeUnit).

        Specified by:
        scheduleAtFixedRate in interface ProcessingTimeService
        Parameters:
        callback - to be executed after the initial delay and then after each period
        initialDelay - initial delay to start executing callback
        period - after the initial delay after which the callback is executed
        Returns:
        Scheduled future representing the task to be executed repeatedly
      • scheduleWithFixedDelay

        public ScheduledFuture<?> scheduleWithFixedDelay​(org.apache.flink.api.common.operators.ProcessingTimeService.ProcessingTimeCallback callback,
                                                         long initialDelay,
                                                         long period)
        Description copied from interface: ProcessingTimeService
        Registers a task to be executed repeatedly with a fixed delay.

        This call behaves similar to ScheduledExecutor.scheduleWithFixedDelay(Runnable, long, long, TimeUnit).

        Specified by:
        scheduleWithFixedDelay in interface ProcessingTimeService
        Parameters:
        callback - to be executed after the initial delay and then after each period
        initialDelay - initial delay to start executing callback
        period - after the initial delay after which the callback is executed
        Returns:
        Scheduled future representing the task to be executed repeatedly
      • isTerminated

        public boolean isTerminated()
        Description copied from interface: TimerService
        Returns true if the service has been shut down, false otherwise.
        Specified by:
        isTerminated in interface TimerService
      • shutdownService

        public void shutdownService()
        Description copied from interface: TimerService
        Shuts down and clean up the timer service provider hard and immediately. This does not wait for any timer to complete. Any further call to ProcessingTimeService.registerTimer(long, ProcessingTimeCallback) will result in a hard exception.
        Specified by:
        shutdownService in interface TimerService
      • shutdownServiceUninterruptible

        public boolean shutdownServiceUninterruptible​(long timeoutMs)
        Description copied from interface: TimerService
        Shuts down and clean up the timer service provider hard and immediately. This does not wait for any timer to complete. Any further call to ProcessingTimeService.registerTimer(long, ProcessingTimeCallback) will result in a hard exception. This call cannot be interrupted and will block until the shutdown is completed or the timeout is exceeded.
        Specified by:
        shutdownServiceUninterruptible in interface TimerService
        Parameters:
        timeoutMs - timeout for blocking on the service shutdown in milliseconds.
        Returns:
        returns true iff the shutdown was completed.