public abstract class AbstractExecutorServices extends Object implements org.jboss.weld.manager.api.ExecutorServices
ExecutorServices| Constructor and Description |
|---|
AbstractExecutorServices() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> List<Future<T>> |
checkForExceptions(List<Future<T>> futures) |
void |
cleanup() |
protected abstract int |
getThreadPoolSize()
Indicates the maximum number of threads in this thread pool.
|
ScheduledExecutorService |
getTimerExecutor()
Returns a singleton instance of ScheduledExecutorService.
|
<T> List<Future<T>> |
invokeAllAndCheckForExceptions(Collection<? extends Callable<T>> tasks) |
<T> List<Future<T>> |
invokeAllAndCheckForExceptions(org.jboss.weld.manager.api.ExecutorServices.TaskFactory<T> factory) |
protected void |
shutdown() |
<T> Collection<? extends Callable<T>> |
wrap(Collection<? extends Callable<T>> tasks)
This method is invoked with the body of
invokeAllAndCheckForExceptions(java.util.Collection)
It allows to wrap the tasks with some additional logic. |
public ScheduledExecutorService getTimerExecutor()
getTimerExecutor in interface org.jboss.weld.manager.api.ExecutorServicespublic <T> List<Future<T>> invokeAllAndCheckForExceptions(Collection<? extends Callable<T>> tasks)
invokeAllAndCheckForExceptions in interface org.jboss.weld.manager.api.ExecutorServicespublic <T> List<Future<T>> invokeAllAndCheckForExceptions(org.jboss.weld.manager.api.ExecutorServices.TaskFactory<T> factory)
invokeAllAndCheckForExceptions in interface org.jboss.weld.manager.api.ExecutorServicesprotected abstract int getThreadPoolSize()
public void cleanup()
cleanup in interface org.jboss.weld.bootstrap.api.Serviceprotected void shutdown()
public <T> Collection<? extends Callable<T>> wrap(Collection<? extends Callable<T>> tasks)
invokeAllAndCheckForExceptions(java.util.Collection)
It allows to wrap the tasks with some additional logic. For instance, Weld's CommonForkJoinPoolExecutorServices
overrides this in order to set TCCL to null prior to execution.Copyright © 2019. All rights reserved.