Package org.jboss.weld.executor
Class AbstractExecutorServices
- java.lang.Object
-
- org.jboss.weld.executor.AbstractExecutorServices
-
- All Implemented Interfaces:
org.jboss.weld.bootstrap.api.Service,org.jboss.weld.manager.api.ExecutorServices
- Direct Known Subclasses:
FixedThreadPoolExecutorServices,SingleThreadExecutorServices,TimingOutFixedThreadPoolExecutorServices
public abstract class AbstractExecutorServices extends Object implements org.jboss.weld.manager.api.ExecutorServices
Common functionality forExecutorServices.- Author:
- Jozef Hartinger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.weld.manager.api.ExecutorServices
org.jboss.weld.manager.api.ExecutorServices.TaskFactory<T extends Object>
-
-
Constructor Summary
Constructors Constructor Description AbstractExecutorServices()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected <T> List<Future<T>>checkForExceptions(List<Future<T>> futures)voidcleanup()protected abstract intgetThreadPoolSize()Indicates the maximum number of threads in this thread pool.<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 voidshutdown()
-
-
-
Method Detail
-
invokeAllAndCheckForExceptions
public <T> List<Future<T>> invokeAllAndCheckForExceptions(Collection<? extends Callable<T>> tasks)
- Specified by:
invokeAllAndCheckForExceptionsin interfaceorg.jboss.weld.manager.api.ExecutorServices
-
invokeAllAndCheckForExceptions
public <T> List<Future<T>> invokeAllAndCheckForExceptions(org.jboss.weld.manager.api.ExecutorServices.TaskFactory<T> factory)
- Specified by:
invokeAllAndCheckForExceptionsin interfaceorg.jboss.weld.manager.api.ExecutorServices
-
cleanup
public void cleanup()
- Specified by:
cleanupin interfaceorg.jboss.weld.bootstrap.api.Service
-
shutdown
protected void shutdown()
-
getThreadPoolSize
protected abstract int getThreadPoolSize()
Indicates the maximum number of threads in this thread pool. If the value is unknown or if the max number of threads is not bounded this method should return -1
-
-