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 for ForkJoinPool.commonPool(). This ExecutorService implementation ignores threadPoolSize and threadPoolKeepAliveTime configuration options.
Author:
Jozef Hartinger
  • Constructor Details

    • CommonForkJoinPoolExecutorServices

      public CommonForkJoinPoolExecutorServices()
  • Method Details

    • getTaskExecutor

      public ExecutorService getTaskExecutor()
    • cleanup

      public void cleanup()
      Specified by:
      cleanup in interface org.jboss.weld.bootstrap.api.Service
      Overrides:
      cleanup in class AbstractExecutorServices
    • getThreadPoolSize

      protected int getThreadPoolSize()
      Description copied from class: AbstractExecutorServices
      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
      Specified by:
      getThreadPoolSize in class AbstractExecutorServices
    • 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 invoking org.jboss.weld.environment.deployment.WeldResourceLoader#getClassLoader().
      Overrides:
      wrap in class AbstractExecutorServices