public interface XnioExecutor extends Executor
Modifier and Type | Interface and Description |
---|---|
static interface |
XnioExecutor.Key
A task key for a timeout task.
|
Modifier and Type | Method and Description |
---|---|
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.
|
XnioExecutor.Key |
executeAtInterval(Runnable command,
long time,
TimeUnit unit)
Execute a command repeatedly at a time interval until it is cancelled.
|
void execute(Runnable command)
XnioExecutor.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
XnioExecutor.Key executeAtInterval(Runnable command, long time, TimeUnit unit)
time
will have elapsed when the task is first run, and again for each subsequent 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
Copyright © 2019 JBoss by Red Hat. All rights reserved.