public static class ThreadPool.Config.ConfigBuilder
extends java.lang.Object
ThreadPool.Config builder. Use to customize the behavior of the ThreadPool instance.| Modifier and Type | Method and Description |
|---|---|
ThreadPool.Config.ConfigBuilder |
backgroundThreadPriority(int backgroundThreadPriority)
Override the thread priority.
|
ThreadPool.Config |
build()
Create the specified configuration parameters.
|
ThreadPool.Config.ConfigBuilder |
overridePoolSize(int overridePoolSize)
Use a custom thread pool size
|
ThreadPool.Config.ConfigBuilder |
workerThreadNamePrefix(java.lang.String workerThreadNamePrefix)
The thread name prefix for the worker threads.
|
public ThreadPool.Config.ConfigBuilder workerThreadNamePrefix(java.lang.String workerThreadNamePrefix)
AsyncWorkerworkerThreadNamePrefix - override prefix valuepublic ThreadPool.Config.ConfigBuilder overridePoolSize(int overridePoolSize)
overridePoolSize - custom value. The ideal value is the number of cores - 1.public ThreadPool.Config.ConfigBuilder backgroundThreadPriority(int backgroundThreadPriority)
backgroundThreadPriority - thread priority value. Either Thread.MIN_PRIORITY, Thread.NORM_PRIORITY, or Thread.MAX_PRIORITY.public ThreadPool.Config build()
ThreadPool.Config