45 |
|
* @spec JSR-166 |
46 |
|
* @revised $Date$ |
47 |
|
* @editor $Author$ |
48 |
+ |
* @author Doug Lea |
49 |
|
*/ |
50 |
|
public interface Future<V> { |
51 |
|
|
64 |
|
* |
65 |
|
* @return computed result |
66 |
|
* @throws CancellationException here??? |
67 |
< |
* @throws ExecutionException if underlying computation threw an exception |
68 |
< |
* @throws InterruptedException if current thread was interrupted while waiting |
67 |
> |
* @throws ExecutionException if underlying computation threw an |
68 |
> |
* exception |
69 |
> |
* @throws InterruptedException if current thread was interrupted |
70 |
> |
* while waiting |
71 |
|
*/ |
72 |
|
V get() throws InterruptedException, ExecutionException; |
73 |
|
|
78 |
|
* @param timeout the maximum time to wait |
79 |
|
* @param granularity the time unit of the timeout argument |
80 |
|
* @return computed result |
81 |
< |
* @throws ExecutionException if underlying computation threw an exception |
82 |
< |
* @throws InterruptedException if current thread was interrupted while waiting |
81 |
> |
* @throws ExecutionException if underlying computation threw an |
82 |
> |
* exception |
83 |
> |
* @throws InterruptedException if current thread was interrupted |
84 |
> |
* while waiting |
85 |
|
* @throws TimeoutException if the wait timed out |
86 |
|
*/ |
87 |
|
V get(long timeout, TimeUnit granularity) |