public interface Job<T>
Modifier and Type | Method and Description |
---|---|
void |
cancel() |
boolean |
isCanceled() |
boolean |
isDone() |
static <T> Job<T> |
nullJob() |
void |
waitForCompletion(int millis)
Waits until all work is executed.
|
static final Job NULL_JOB
void cancel()
boolean isCanceled()
boolean isDone()
void waitForCompletion(int millis) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
cancel()
might not lead to this method termination because the job can be in the middle of execution.java.util.concurrent.TimeoutException
- when timeout expiresjava.lang.InterruptedException
java.util.concurrent.ExecutionException
static <T> Job<T> nullJob()