public interface Scheduler
| Modifier and Type | Method and Description |
|---|---|
java.io.Closeable |
schedule(java.lang.Runnable run)
Schedule for ASAP execution.
|
java.io.Closeable |
schedule(java.lang.Runnable run,
long initialDelay,
long betweenDelay,
java.util.concurrent.TimeUnit unit)
Schedule a repeated execution of the given task with
the given initialDelay (in nanoseconds) and betweenDelay
(in nanoseconds).
|
java.io.Closeable |
schedule(java.lang.Runnable run,
long delay,
java.util.concurrent.TimeUnit unit)
Schedule a single execution of the runnable task
with the given delay of nanoseconds.
|
@Nonnull
java.io.Closeable schedule(@Nonnull
java.lang.Runnable run)
run - the runnable task@Nonnull
java.io.Closeable schedule(@Nonnull
java.lang.Runnable run,
long delay,
@Nonnull
java.util.concurrent.TimeUnit unit)
run - the task to rundelay - the initial delay,unit - the delay time unit
implementations might not have the capability to
schedule in this resolution@Nonnull
java.io.Closeable schedule(@Nonnull
java.lang.Runnable run,
long initialDelay,
long betweenDelay,
@Nonnull
java.util.concurrent.TimeUnit unit)
ExecutorService.scheduleAtFixedRate()).
Note: Implementations might not have the capability to
schedule nanosecond resolution.run - the task to runinitialDelay - the initial delay before the first runbetweenDelay - the delay between task runs after theunit - the delay time unit