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