public abstract class AbstractExecutorServices extends Object implements ExecutorServices
ExecutorServices.ExecutorServices.TaskFactory<T>| Constructor and Description |
|---|
AbstractExecutorServices() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Called by Weld when it is shutting down, allowing the service to perform any cleanup needed.
|
protected abstract int |
getThreadPoolSize()
Indicates the maximum number of threads in this thread pool.
|
protected <T> List<Future<T>> |
checkForExceptions(List<Future<T>> futures) |
<T> List<Future<T>> |
invokeAllAndCheckForExceptions(Collection<? extends Callable<T>> tasks)
Executes the given tasks and blocks until they all finish.
|
<T> List<Future<T>> |
invokeAllAndCheckForExceptions(ExecutorServices.TaskFactory<T> factory)
Executes all the tasks returned from calling
ExecutorServices.TaskFactory.createTasks(int) method. |
protected void |
shutdown() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTaskExecutorpublic <T> List<Future<T>> invokeAllAndCheckForExceptions(Collection<? extends Callable<T>> tasks)
ExecutorServicesinvokeAllAndCheckForExceptions in interface ExecutorServicesT - the result type of taskstasks - the collection of taskspublic <T> List<Future<T>> invokeAllAndCheckForExceptions(ExecutorServices.TaskFactory<T> factory)
ExecutorServicesExecutorServices.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.invokeAllAndCheckForExceptions in interface ExecutorServicesT - the result type of tasksfactory - factory capable of creating taskspublic void cleanup()
Serviceprotected void shutdown()
protected abstract int getThreadPoolSize()
Copyright © 2015. All Rights Reserved.