Interface SchedulerAdapter

All Known Implementing Classes:
AbstractJavaScheduler

public interface SchedulerAdapter
A scheduler for running tasks using the systems provided by the platform
  • Method Details

    • async

      Executor async()
      Gets an async executor instance
      Returns:
      an async executor instance
    • sync

      Executor sync()
      Gets a sync executor instance
      Returns:
      a sync executor instance
    • executeAsync

      default void executeAsync(Runnable task)
      Executes a task async
      Parameters:
      task - the task
    • executeSync

      default void executeSync(Runnable task)
      Executes a task sync
      Parameters:
      task - the task
    • asyncLater

      SchedulerTask asyncLater(Runnable task, long delay, TimeUnit unit)
      Executes the given task with a delay.
      Parameters:
      task - the task
      delay - the delay
      unit - the unit of delay
      Returns:
      the resultant task instance
    • asyncRepeating

      SchedulerTask asyncRepeating(Runnable task, long interval, TimeUnit unit)
      Executes the given task repeatedly at a given interval.
      Parameters:
      task - the task
      interval - the interval
      unit - the unit of interval
      Returns:
      the resultant task instance
    • shutdownScheduler

      void shutdownScheduler()
    • shutdownExecutor

      void shutdownExecutor()
      Shuts down the executor instance.

      async() and executeAsync(Runnable).