Package org.eclipse.jetty.util.thread
Interface Scheduler
- All Superinterfaces:
LifeCycle
- All Known Implementing Classes:
ScheduledExecutorScheduler
,TimerScheduler
Schedules tasks to be executed after a delay.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A delayed task that can be cancelled.Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Method Summary
Modifier and TypeMethodDescriptionSchedules a task to be executed after the given delay.default Scheduler.Task
Schedules a task to be executed after the given delay.Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
-
Method Details
-
schedule
Schedules a task to be executed after the given delay.
- Parameters:
task
- the task to executedelay
- the delay valueunits
- the unit of time of the delay- Returns:
- a delayed task
-
schedule
Schedules a task to be executed after the given delay.
- Parameters:
task
- the task to executedelay
- the delay duration- Returns:
- a delayed task
-