public interface Scheduler
Modifier and Type | Interface and Description |
---|---|
static interface |
Scheduler.ScheduledTask |
Modifier and Type | Method and Description |
---|---|
Scheduler.ScheduledTask |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit timeUnit)
Schedules a
command to be executed periodically after initialDelay . |
void |
shutdownNow()
Cancels all scheduled tasks.
|
Scheduler.ScheduledTask scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit timeUnit)
command
to be executed periodically after initialDelay
. Frequency of execution is
represented by delay
. New task is scheduled after execution of current one.command
- the task to be executedinitialDelay
- for how long the first execution is delayeddelay
- frequency of task executiontimeUnit
- the time unitvoid shutdownNow()
Copyright © 2010–2024. All rights reserved.