Class ExecutorServiceScheduler

java.lang.Object
com.github.benmanes.caffeine.cache.ExecutorServiceScheduler
All Implemented Interfaces:
Scheduler, Serializable

final class ExecutorServiceScheduler extends Object implements Scheduler, Serializable
  • Field Details

  • Constructor Details

  • Method Details

    • schedule

      public Future<?> schedule(Executor executor, Runnable command, long delay, TimeUnit unit)
      Description copied from interface: Scheduler
      Returns a future that will submit the task to the given executor after the given delay.
      Specified by:
      schedule in interface Scheduler
      Parameters:
      executor - the executor to run the task
      command - the runnable task to schedule
      delay - how long to delay, in units of unit
      unit - a TimeUnit determining how to interpret the delay parameter
      Returns:
      a scheduled future representing pending submission of the task