Interface ThreadPoolFactory

All Known Implementing Classes:
DefaultThreadPoolFactory

public interface ThreadPoolFactory
  • Method Details

    • newCachedThreadPool

      ExecutorService newCachedThreadPool(ThreadFactory threadFactory)
      Creates a new cached thread pool
      The cached thread pool is a term from the JDK from the method Executors.newCachedThreadPool(). Typically it will have no size limit (this is why it is handled separately
      Parameters:
      threadFactory - factory for creating threads
      Returns:
      the created thread pool
    • newThreadPool

      ExecutorService newThreadPool(ThreadPoolConfig config, ThreadFactory threadFactory)
      Create a thread pool using the given thread pool profile
      Parameters:
      config - parameters of the thread pool
      threadFactory - factory for creating threads
      Returns:
      the created thread pool
    • newScheduledThreadPool

      ScheduledExecutorService newScheduledThreadPool(ThreadPoolConfig config, ThreadFactory threadFactory)
      Create a scheduled thread pool using the given thread pool profile
      Parameters:
      config - parameters of the thread pool
      threadFactory - factory for creating threads
      Returns:
      the created thread pool