-
Nested Class Summary
Nested classes/interfaces declared in interface Future
Future.State
static enum
Represents the computation state.
-
Method Summary
void
Sets this Future to the result of its computation unless it has
been cancelled (or has already been invoked, in which case
effects are undefined).
Methods declared in interface Future
cancel, exceptionNow, get, get, isCancelled, isDone, resultNow, state
boolean
cancel(boolean mayInterruptIfRunning)
Attempts to cancel execution of this task.
Returns the exception thrown by the task, without waiting.
Waits if necessary for the computation to complete, and then
retrieves its result.
Waits if necessary for at most the given time for the computation
to complete, and then retrieves its result, if available.
boolean
Returns true if this task was cancelled before it completed
normally.
boolean
Returns true if this task completed.
Returns the computed result, without waiting.
Returns the computation state.