|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ExecutorServices
Allows a custom TaskExecutor to be provided by the container. By default,
Executors.newSingleThreadExecutor() is used.
This is a per-deployment service.
| Nested Class Summary | |
|---|---|
static interface |
ExecutorServices.TaskFactory<T>
Instead of submitting a list of tasks to be executed a caller may submit a factory object capable of creating the list of tasks. |
| Method Summary | ||
|---|---|---|
ExecutorService |
getTaskExecutor()
|
|
|
invokeAllAndCheckForExceptions(Collection<? extends Callable<T>> tasks)
Executes the given tasks and blocks until they all finish. |
|
|
invokeAllAndCheckForExceptions(ExecutorServices.TaskFactory<T> factory)
Executes all the tasks returned from calling ExecutorServices.TaskFactory.createTasks(int) method. |
|
| Methods inherited from interface org.jboss.weld.bootstrap.api.Service |
|---|
cleanup |
| Method Detail |
|---|
ExecutorService getTaskExecutor()
<T> List<Future<T>> invokeAllAndCheckForExceptions(Collection<? extends Callable<T>> tasks)
tasks - the collection of tasks
<T> List<Future<T>> invokeAllAndCheckForExceptions(ExecutorServices.TaskFactory<T> factory)
ExecutorServices.TaskFactory.createTasks(int) method. The method is called exactly
once.If a task throws an exception, the exception is rethrown by this method. If multiple tasks throw exceptions, there
is no guarantee about which of the exceptions is rethrown by this method.
factory - factory capable of creating tasks
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||