Class TimingOutFixedThreadPoolExecutorServices

  • All Implemented Interfaces:
    org.jboss.weld.bootstrap.api.Service, org.jboss.weld.manager.api.ExecutorServices

    public class TimingOutFixedThreadPoolExecutorServices
    extends AbstractExecutorServices
    Implementation of ExtendedExecutorServices that uses a fixed thread pool. However threads are terminated if no new tasks arrive within the keep-alive time.
    Author:
    Martin Kouba
    • Constructor Detail

      • TimingOutFixedThreadPoolExecutorServices

        public TimingOutFixedThreadPoolExecutorServices​(int threadPoolSize,
                                                        long keepAliveTime)
    • Method Detail

      • getPoolSize

        public int getPoolSize()
      • 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