Package org.jboss.weld.executor
Class CommonForkJoinPoolExecutorServices
- java.lang.Object
-
- org.jboss.weld.executor.AbstractExecutorServices
-
- org.jboss.weld.executor.CommonForkJoinPoolExecutorServices
-
- All Implemented Interfaces:
org.jboss.weld.bootstrap.api.Service,org.jboss.weld.manager.api.ExecutorServices
public class CommonForkJoinPoolExecutorServices extends AbstractExecutorServices
Wrapper forForkJoinPool.commonPool(). ThisExecutorServiceimplementation ignores threadPoolSize and threadPoolKeepAliveTime configuration options.- 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 CommonForkJoinPoolExecutorServices()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()ExecutorServicegetTaskExecutor()protected intgetThreadPoolSize()Indicates the maximum number of threads in this thread pool.<T> Collection<? extends Callable<T>>wrap(Collection<? extends Callable<T>> tasks)If in SE environment, this method wraps the collection of tasks in such a way that it sets the TCCL to null before executing them and re-sets it to previous value once done.-
Methods inherited from class org.jboss.weld.executor.AbstractExecutorServices
checkForExceptions, getTimerExecutor, invokeAllAndCheckForExceptions, invokeAllAndCheckForExceptions, shutdown
-
-
-
-
Method Detail
-
getTaskExecutor
public ExecutorService getTaskExecutor()
-
cleanup
public void cleanup()
- Specified by:
cleanupin interfaceorg.jboss.weld.bootstrap.api.Service- Overrides:
cleanupin classAbstractExecutorServices
-
getThreadPoolSize
protected int getThreadPoolSize()
Description copied from class:AbstractExecutorServicesIndicates 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- Specified by:
getThreadPoolSizein classAbstractExecutorServices
-
wrap
public <T> Collection<? extends Callable<T>> wrap(Collection<? extends Callable<T>> tasks)
If in SE environment, this method wraps the collection of tasks in such a way that it sets the TCCL to null before executing them and re-sets it to previous value once done. This affect the CL Weld will pick up when invokingWeldResourceLoader.getClassLoader().- Overrides:
wrapin classAbstractExecutorServices
-
-