Modifier and Type | Method and Description |
---|---|
<V> ScheduledFuture<V> |
ScheduledExecutorService.schedule(Callable<V> callable,
long delay,
TimeUnit unit)
Creates and executes a ScheduledFuture that becomes enabled after the given delay.
|
ScheduledFuture<?> |
ScheduledExecutorService.schedule(java.lang.Runnable command,
long delay,
TimeUnit unit)
Creates and executes a one-shot action that becomes enabled after the given delay.
|
ScheduledFuture<?> |
ScheduledExecutorService.scheduleAtFixedRate(java.lang.Runnable command,
long initialDelay,
long period,
TimeUnit unit)
Creates and executes a periodic action that becomes enabled first after the given initial delay, and subsequently
with the given period; that is executions will commence after initialDelay then
initialDelay+period, then initialDelay + 2 * period, and so on.
|
ScheduledFuture<?> |
ScheduledExecutorService.scheduleWithFixedDelay(java.lang.Runnable command,
long initialDelay,
long delay,
TimeUnit unit)
Creates and executes a periodic action that becomes enabled first after the given initial delay, and subsequently
with the given delay between the termination of one execution and the commencement of the next.
|