Class UnboundedGrowingThreadPoolExecutor

All Implemented Interfaces:
Executor, ExecutorService

public class UnboundedGrowingThreadPoolExecutor extends ThreadPoolExecutor
A ThreadPoolExecutor that increases the threads in the pool even if the queue is not full.
  • Field Details

  • Constructor Details

    • UnboundedGrowingThreadPoolExecutor

      public UnboundedGrowingThreadPoolExecutor(int corePoolSize, int maximumPoolSize, Duration keepAlive, String threadNamePrefix)
      Default constructor
      Parameters:
      corePoolSize - the number of core threads
      maximumPoolSize - the maximum number of threads to allow in the pool
      keepAlive - when the number of threads is greater than the core, this is the maximum time that excess idle threads will wait for new tasks before terminating.
      threadNamePrefix - the prefix to use for the name of the threads part of the pool
  • Method Details