|
XNIO API 3.1.0.Beta1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XnioExecutor
An executor with the capability to run timed, cancellable tasks.
Nested Class Summary | |
---|---|
static interface |
XnioExecutor.Key
A task key for a timeout task. |
Method Summary | |
---|---|
void |
execute(Runnable command)
Execute a task in this executor. |
XnioExecutor.Key |
executeAfter(Runnable command,
long time,
TimeUnit unit)
Execute a command after a period of time. |
Method Detail |
---|
void execute(Runnable command)
execute
in interface Executor
command
- the command to runXnioExecutor.Key executeAfter(Runnable command, long time, TimeUnit unit)
time
will
have elapsed when the task is run. The returned key may be used to cancel the task before it runs.
command
- the command to executetime
- the amount of time to delay, or 0
to run immediatelyunit
- the time unit to apply to time
|
XNIO API 3.1.0.Beta1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |