public class ThreadPoolBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
IDLE_TIMEOUT |
static int |
MAX_REQUEST_QUEUE_SIZE |
static int |
MAX_THREADS |
static int |
MIN_THREADS |
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.jetty.util.thread.ThreadPool |
build()
Builds a
ThreadPool based on the parameters of this builder |
static ThreadPoolBuilder |
instance()
Returns a new
ThreadPoolBuilder instance. |
ThreadPoolBuilder |
withMaxRequestQueueSize(int queueSize)
Sets the maximum request queue size for this thread pool.
|
ThreadPoolBuilder |
withMaxThreads(int maxNumberOfThreads)
Sets the max number of threads for the thread pool.
|
ThreadPoolBuilder |
withMinThreads(int minNumberOfThreads)
Sets the minimum number of threads for the thread pool.
|
public static final int MAX_REQUEST_QUEUE_SIZE
public static final int MAX_THREADS
public static final int MIN_THREADS
public static final int IDLE_TIMEOUT
public static ThreadPoolBuilder instance()
ThreadPoolBuilder instance.ThreadPoolBuilderpublic ThreadPoolBuilder withMaxThreads(int maxNumberOfThreads)
maxNumberOfThreads - the max number of threadspublic ThreadPoolBuilder withMinThreads(int minNumberOfThreads)
minNumberOfThreads - the minimum number of threadspublic ThreadPoolBuilder withMaxRequestQueueSize(int queueSize)
queueSize - the maximum request queue size.public org.eclipse.jetty.util.thread.ThreadPool build()
ThreadPool based on the parameters of this builderThreadPoolCopyright © 2016. All rights reserved.