public final class EvenMoreExecutors
extends java.lang.Object
ExecutorService
factory methods.Modifier and Type | Method and Description |
---|---|
static java.util.concurrent.ExecutorService |
newBoundedCachedThreadPool(int minThreads,
int maxThreads,
int queueSize)
Creates a thread pool that creates new threads as needed up to
a maximum number of threads, but will reuse previously constructed
threads when they are available.
|
static java.util.concurrent.ExecutorService |
newBoundedCachedThreadPool(int minThreads,
int maxThreads,
int queueSize,
java.lang.String threadFormat)
Creates a thread pool that creates new threads as needed up to
a maximum number of threads, but will reuse previously constructed
threads when they are available.
|
public static java.util.concurrent.ExecutorService newBoundedCachedThreadPool(int minThreads, int maxThreads, int queueSize)
minThreads
- the minimum number of threads to have at a given timemaxThreads
- the maximum number of threads to have at a given timequeueSize
- the size of the queue before new submissions are rejectedpublic static java.util.concurrent.ExecutorService newBoundedCachedThreadPool(int minThreads, int maxThreads, int queueSize, java.lang.String threadFormat)
minThreads
- the minimum number of threads to have at a given timemaxThreads
- the maximum number of threads to have at a given timequeueSize
- the size of the queue before new submissions are rejectedthreadFormat
- thread name formatter