9 |
|
import java.util.concurrent.locks.*; |
10 |
|
|
11 |
|
/** |
12 |
< |
* Base class for cancellable actions running in the Executor |
13 |
< |
* framework. In addition to serving as a standalone class, this |
14 |
< |
* provides <tt>protected</tt> functionality that may be useful when |
15 |
< |
* creating customized task classes. |
12 |
> |
* Base class for {@link Cancellable} {@link java.lang.Runnable} |
13 |
> |
* actions within the {@link Executor} framework. In addition to |
14 |
> |
* serving as a standalone class, this provides <tt>protected</tt> |
15 |
> |
* functionality that may be useful when creating customized task |
16 |
> |
* classes. |
17 |
|
* @since 1.5 |
18 |
|
* @author Doug Lea |
19 |
|
*/ |
62 |
|
* Creates a new CancellableTask without a runnable action, which |
63 |
|
* must be set using <tt>setRunnable</tt> before use. This is |
64 |
|
* intended for use in subclasses that must complete superclass |
65 |
< |
* construction beofre establishing the runnable action. |
65 |
> |
* construction before establishing the runnable action. |
66 |
|
*/ |
67 |
|
protected CancellableTask() { |
68 |
|
} |
260 |
|
* result. |
261 |
|
* |
262 |
|
* @param timeout the maximum time to wait |
263 |
< |
* @param granularity the time unit of the timeout argument |
263 |
> |
* @param unit the time unit of the timeout argument |
264 |
|
* @return computed result |
265 |
|
* @throws ExecutionException if underlying computation threw an |
266 |
|
* exception |