public interface Scheduler
extends java.util.concurrent.Executor
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Scheduler.RunnableWithException |
| Modifier and Type | Method and Description |
|---|---|
Task |
after(java.lang.Runnable runnable,
long ms,
java.lang.String name)
Schedule a runnable to run after a certain time.
|
Task |
deamon(Scheduler.RunnableWithException r,
boolean manage,
java.lang.String name)
Execute long running task and optionally restart when
exceptions are thrown.
|
Task |
execute(java.lang.Runnable runnable,
java.lang.String name)
Executes a task in the background, intended for short term tasks
|
Task |
periodic(java.lang.Runnable runnable,
long ms,
java.lang.String name)
Schedule a runnable to run periodically at a fixed rate.
|
<T> <any> |
submit(java.util.concurrent.Callable<T> callable,
java.lang.String name)
Submit a task and return a promise to the answer
|
Task periodic(java.lang.Runnable runnable, long ms, java.lang.String name)
name - The name of the taskrunnable - the task to runTask after(java.lang.Runnable runnable, long ms, java.lang.String name)
name - The name of the taskrunnable - the task to runTask execute(java.lang.Runnable runnable, java.lang.String name)
name - The name of the taskrunnable - the task to run<T> <any> submit(java.util.concurrent.Callable<T> callable,
java.lang.String name)
Task deamon(Scheduler.RunnableWithException r, boolean manage, java.lang.String name)
r - The bodymanage - restart when it failsaQute SARL All Rights Reserved