Table of Contents
Introduced in Java 5 (2004).
A java.util.concurrent.Future
is a placeholder for a result of a computation task that hasn’t finished yet.
Once the task completes, the Future holds the result.
The following operations can be performed on a Future:
Method name | Description |
---|---|
|
Attempts to cancel execution of this task. |
|
Waits if necessary for the computation to complete, and then retrieves its result, with or without a timeout parameter. |
|
Check if the Future has been canceled, prior to normal completion. |
|
Check if the Future completed normally. |