Class TimerScheduler

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.thread.TimerScheduler
All Implemented Interfaces:
Runnable, LifeCycle, Scheduler

@Deprecated(since="12.0.9", forRemoval=true) public class TimerScheduler extends AbstractLifeCycle implements Scheduler, Runnable
Deprecated, for removal: This API element is subject to removal in a future version.
A scheduler based on the JVM Timer class.
  • Constructor Details

    • TimerScheduler

      public TimerScheduler()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • TimerScheduler

      public TimerScheduler(String name, boolean daemon)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • doStart

      protected void doStart() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: AbstractLifeCycle
      Method to override to start the lifecycle
      Overrides:
      doStart in class AbstractLifeCycle
      Throws:
      AbstractLifeCycle.StopException - If thrown, the lifecycle will immediately be stopped.
      Exception - If there was a problem starting. Will cause a transition to FAILED state
    • doStop

      protected void doStop() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: AbstractLifeCycle
      Method to override to stop the lifecycle
      Overrides:
      doStop in class AbstractLifeCycle
      Throws:
      Exception - If there was a problem stopping. Will cause a transition to FAILED state
    • schedule

      public Scheduler.Task schedule(Runnable task, long delay, TimeUnit units)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Scheduler

      Schedules a task to be executed after the given delay.

      Specified by:
      schedule in interface Scheduler
      Parameters:
      task - the task to execute
      delay - the delay value
      units - the unit of time of the delay
      Returns:
      a delayed task
    • run

      public void run()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      run in interface Runnable