public interface Task
Modifier and Type | Interface and Description |
---|---|
static class |
Task.State |
Modifier and Type | Method and Description |
---|---|
TaskCoordinator |
getCoordinator()
getCoordinator
|
TaskMonitor |
getMonitor()
getMonitor
|
void |
schedule()
This is called to add the task to the queue of tasks that can be considered to be runnable
|
void |
waitFor()
Wait for this task to complete.
|
boolean |
waitFor(long timeout,
TimeUnit unit)
Wait for this task to complete or until a timeout occurs.
|
TaskCoordinator getCoordinator()
getCoordinator
TaskCoordinator
object.TaskMonitor getMonitor()
getMonitor
TaskMonitor
object.void schedule()
void waitFor() throws InterruptedException, ExecutionException
InterruptedException
- if any.ExecutionException
- if any.boolean waitFor(long timeout, TimeUnit unit) throws InterruptedException
timeout
- a long.unit
- a TimeUnit
object.InterruptedException
- if any.Copyright © 2021. All rights reserved.