public class ProfilingExecutorServices extends java.lang.Object implements ExecutorServices
ExecutorServices.TaskFactory<T>| Constructor and Description |
|---|
ProfilingExecutorServices(ExecutorServices delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Called by Weld when it is shutting down, allowing the service to perform any cleanup needed.
|
ExecutorServices |
getDelegate() |
java.util.concurrent.ExecutorService |
getTaskExecutor() |
<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. |
public ProfilingExecutorServices(ExecutorServices delegate)
public java.util.concurrent.ExecutorService getTaskExecutor()
getTaskExecutor in interface ExecutorServicespublic void cleanup()
Servicepublic <T> java.util.List<java.util.concurrent.Future<T>> invokeAllAndCheckForExceptions(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks)
ExecutorServicesinvokeAllAndCheckForExceptions in interface ExecutorServicesT - the result type of taskstasks - 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 ExecutorServicesT - the result type of tasksfactory - factory capable of creating taskspublic ExecutorServices getDelegate()
Copyright © 2015. All Rights Reserved.