Interface Scheduler


public interface Scheduler
Schedules tasks to be executed in future.
Since:
4.2.1
Author:
Sara Pellegrini
  • Method Details

    • scheduleWithFixedDelay

      Scheduler.ScheduledTask scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit timeUnit)
      Schedules a command to be executed periodically after initialDelay. Frequency of execution is represented by delay. New task is scheduled after execution of current one.
      Parameters:
      command - the task to be executed
      initialDelay - for how long the first execution is delayed
      delay - frequency of task execution
      timeUnit - the time unit
      Returns:
      information about the schedule, and means to cancel it
    • shutdownNow

      void shutdownNow()
      Cancels all scheduled tasks.