159 |
|
* @param value the value which will become the return value of |
160 |
|
* the task upon task completion |
161 |
|
* @return a Future representing pending completion of the task |
162 |
< |
* @throws CannotExecuteException if the task cannot be scheduled |
162 |
> |
* @throws ExecutionException if the task cannot be scheduled |
163 |
|
* for execution |
164 |
|
*/ |
165 |
|
public static <T> Future<T> execute(Executor executor, Runnable task, T value) { |
181 |
|
* @param executor the Executor to which the task will be submitted |
182 |
|
* @param task the task to submit |
183 |
|
* @return a Future representing pending completion of the task |
184 |
< |
* @throws CannotExecuteException if task cannot be scheduled for execution |
184 |
> |
* @throws ExecutionException if task cannot be scheduled for execution |
185 |
|
*/ |
186 |
|
public static <T> FutureTask<T> execute(Executor executor, Callable<T> task) { |
187 |
|
FutureTask<T> ftask; |
201 |
|
* |
202 |
|
* @param executor the Executor to which the task will be submitted |
203 |
|
* @param task the task to submit |
204 |
< |
* @throws CannotExecuteException if task cannot be scheduled for execution |
204 |
> |
* @throws ExecutionException if task cannot be scheduled for execution |
205 |
|
*/ |
206 |
|
public static void invoke(Executor executor, Runnable task) |
207 |
|
throws ExecutionException, InterruptedException { |
217 |
|
* @param executor the Executor to which the task will be submitted |
218 |
|
* @param task the task to submit |
219 |
|
* @return a Future representing pending completion of the task |
220 |
< |
* @throws CannotExecuteException if task cannot be scheduled for execution |
220 |
> |
* @throws ExecutionException if task cannot be scheduled for execution |
221 |
|
*/ |
222 |
|
public static <T> T invoke(Executor executor, Callable<T> task) |
223 |
|
throws ExecutionException, InterruptedException { |