Class Scheduler

All Implemented Interfaces:
AutoCloseable, Executor, ExecutorService, ScheduledExecutorService

public class Scheduler extends ScheduledThreadPoolExecutor
Lightweight scheduler for deferred and periodic tasks.
  • Constructor Details

    • Scheduler

      public Scheduler(String id)
      Creates a new Scheduler.
      Parameters:
      id - a custom defined id
    • Scheduler

      public Scheduler(String id, int corePoolSize, RejectedExecutionHandler handler)
      Creates a new Scheduler.
      Parameters:
      id - a custom defined id
      corePoolSize - the number of threads to keep in the pool, even if they are idle
      handler - the handler
  • Method Details

    • id

      public String id()
      Performs the id operation.
      Returns:
      the result
    • toString

      public String toString()
      Performs the toString operation.
      Overrides:
      toString in class ThreadPoolExecutor
      Returns:
      the result