public interface Scheduler
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Scheduler.Cancellable |
| Modifier and Type | Method and Description |
|---|---|
static Scheduler |
fromScheduledExecutor(java.util.concurrent.ScheduledExecutorService scheduledExecutor)
Create a
Scheduler from the provided ScheduledExecutorService. |
Scheduler.Cancellable |
schedule(java.lang.Runnable command,
long delay,
java.util.concurrent.TimeUnit unit)
Schedule a command to run after a
delay. |
Scheduler.Cancellable schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)
delay.command - the commadn to run.delay - the time to delay.unit - the time unit of the delay.Scheduler.Cancellable that can be used to attempt cancellation if needed.