Interface Scheduler

  • All Known Implementing Classes:
    DefaultScheduler, NoOpScheduler, TimerScheduler

    public interface Scheduler
    Scheduler interface. Each implementation should provide implementation for:
    • start(Runnable) method: should schedule task in a specified amount of time.
    • stop() method: should cancel future task.
    Note that this interface does not guarantee that scheduled task will effectively be executed.
    • Method Detail

      • start

        void start​(Runnable runnable)
        Schedule task.
        Task should not run immediately, instead it should run in a specified amount of time (implementation dependent).
        Parameters:
        runnable - Task to run.
      • stop

        void stop()
        Stop pending task.
      • shutdown

        void shutdown()
        Shutdown scheduler: once done, the scheduler will not be usable anymore.