Class SimplePeriodicRunner

    • Method Detail

      • setPeriodicTask

        public void setPeriodicTask​(Runnable task)
        Description copied from interface: PeriodicRunner
        Specify the task that this PeriodicRunner should run periodically. The specified task will not be run until after the PeriodicRunner.start() method has been called.
        Specified by:
        setPeriodicTask in interface PeriodicRunner
        Parameters:
        task - The task to run periodically.
      • start

        public void start()
        Description copied from interface: PeriodicRunner
        Start calling the specified Runnable task periodically.
        Specified by:
        start in interface PeriodicRunner
      • stop

        public void stop()
        Stop the Runnable task from executing in the future. Note that this will not interrupt the Runnable task if it is currently executing; it will finish the current execution normally.
        Specified by:
        stop in interface PeriodicRunner