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
Wrapper for
ForkJoinPool.commonPool(). This ExecutorService implementation 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()protected intIndicates 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
-
Constructor Details
-
CommonForkJoinPoolExecutorServices
public CommonForkJoinPoolExecutorServices()
-
-
Method Details
-
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
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 invokingorg.jboss.weld.environment.deployment.WeldResourceLoader#getClassLoader().- Overrides:
wrapin classAbstractExecutorServices
-