Interface Scheduler
public interface Scheduler
-
Method Summary
Modifier and TypeMethodDescriptionExecutes the given runnable asynchronously.Schedules the given runnable to be executed asynchronously after the given delay.scheduleRepeating
(Runnable runnable, long delay, long period, TimeUnit timeUnit) Schedules the given runnable to be executed asynchronously after a delay and then repeatedly with a period.void
shutdown()
Shuts down the scheduler and awaits task termination.
-
Method Details
-
execute
Executes the given runnable asynchronously.- Parameters:
runnable
- runnable to execute
-
schedule
Schedules the given runnable to be executed asynchronously after the given delay.- Parameters:
runnable
- runnable to executedelay
- delay before executiontimeUnit
- time unit of the delay
-
scheduleRepeating
Schedules the given runnable to be executed asynchronously after a delay and then repeatedly with a period.- Parameters:
runnable
- runnable to executedelay
- delay before executionperiod
- period between executionstimeUnit
- time unit of the delay and period
-
shutdown
void shutdown()Shuts down the scheduler and awaits task termination.
-