| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv final Context | |
| public void | execute(Runnable
the runnable task command)Implements java. Executes the given command at some time in the future. |
| public <T> List | invokeAll(Collection<? extends Callable<T>>
the collection of tasks tasks)Implements java. Executes the given tasks, returning a list of Futures holding their status and results when all complete. |
| public <T> List | invokeAll(Collection<? extends Callable<T>>
the collection of tasks tasks, long the maximum time to wait timeout, TimeUnit the time unit of the timeout argument unit)Implements java. Executes the given tasks, returning a list of Futures holding their status and results when all complete or the timeout expires, whichever happens first. |
| public <T> T | invokeAny(Collection<? extends Callable<T>>
the collection of tasks tasks)Implements java. Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do. |
| public <T> T | invokeAny(Collection<? extends Callable<T>>
the collection of tasks tasks, long the maximum time to wait timeout, TimeUnit the time unit of the timeout argument unit)Implements java. Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do before the given timeout elapses. |
| public <T> Future | submit(Callable<T>
the task to submit task)Implements java. Submits a value-returning task for execution and returns a Future representing the pending results of the task. |
| public <T> Future | submit(Runnable
the task to submit task, T the result to return result)Implements java. Submits a Runnable task for execution and returns a Future representing that task. |
| public Future | submit(Runnable
the task to submit task)Implements java. Submits a Runnable task for execution and returns a Future representing that task. |
| context | back to summary |
|---|---|
| private final Context context | |
| ContextExecutorService | back to summary |
|---|---|
| pack-priv ContextExecutorService(Context context, ExecutorService delegate) | |
| context | back to summary |
|---|---|
| pack-priv final Context context() | |
| execute | back to summary |
|---|---|
| public void execute(Runnable command) Implements java. Doc from java. Executes the given command at some time in the future. The command
may execute in a new thread, in a pooled thread, or in the calling
thread, at the discretion of the | |
| invokeAll | back to summary |
|---|---|
| public <T> List Implements java. Doc from java. Executes the given tasks, returning a list of Futures holding
their status and results when all complete.
| |
| invokeAll | back to summary |
|---|---|
| public <T> List Implements java. Doc from java. Executes the given tasks, returning a list of Futures holding
their status and results
when all complete or the timeout expires, whichever happens first.
| |
| invokeAny | back to summary |
|---|---|
| public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException Implements java. Doc from java. Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do. Upon normal or exceptional return, tasks that have not completed are cancelled. The results of this method are undefined if the given collection is modified while this operation is in progress.
| |
| invokeAny | back to summary |
|---|---|
| public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException Implements java. Doc from java. Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do before the given timeout elapses. Upon normal or exceptional return, tasks that have not completed are cancelled. The results of this method are undefined if the given collection is modified while this operation is in progress.
| |
| submit | back to summary |
|---|---|
| public <T> Future Implements java. Doc from java. Submits a value-returning task for execution and returns a
Future representing the pending results of the task. The
Future's
If you would like to immediately block waiting
for a task, you can use constructions of the form
Note The | |
| submit | back to summary |
|---|---|
| public <T> Future Implements java. Doc from java. Submits a Runnable task for execution and returns a Future
representing that task. The Future's | |
| submit | back to summary |
|---|---|
| public Future Implements java. Doc from java. Submits a Runnable task for execution and returns a Future
representing that task. The Future's | |