Builder<ThreadPoolSupplier>public static class ThreadPoolSupplier.Builder extends java.lang.Object implements Builder<ThreadPoolSupplier>
ThreadPoolSupplier.| Constructor | Description |
|---|---|
Builder() |
| Modifier and Type | Method | Description |
|---|---|---|
ThreadPoolSupplier |
build() |
Build the instance from this builder.
|
ThreadPoolSupplier.Builder |
corePoolSize(int corePoolSize) |
Core pool size of the thread pool executor.
|
ThreadPoolSupplier.Builder |
daemon(boolean daemon) |
Is daemon of the thread pool executor.
|
ThreadPoolSupplier.Builder |
fromConfig(Config config) |
Load all properties for this thread pool executor from configuration.
|
ThreadPoolSupplier.Builder |
keepAliveMinutes(int keepAliveMinutes) |
Keep alive minutes of the thread pool executor.
|
ThreadPoolSupplier.Builder |
maxPoolSize(int maxPoolSize) |
Max pool size of the thread pool executor.
|
ThreadPoolSupplier.Builder |
prestart(boolean prestart) |
Whether to prestart core threads in this thread pool executor.
|
ThreadPoolSupplier.Builder |
queueCapacity(int queueCapacity) |
Queue capacity of the thread pool executor.
|
ThreadPoolSupplier.Builder |
threadNamePrefix(java.lang.String threadNamePrefix) |
Name prefix for threads in this thread pool executor.
|
public ThreadPoolSupplier build()
Builderbuild in interface Builder<ThreadPoolSupplier>public ThreadPoolSupplier.Builder corePoolSize(int corePoolSize)
corePoolSize - see ThreadPoolExecutor.getCorePoolSize()public ThreadPoolSupplier.Builder maxPoolSize(int maxPoolSize)
maxPoolSize - see ThreadPoolExecutor.getMaximumPoolSize()public ThreadPoolSupplier.Builder keepAliveMinutes(int keepAliveMinutes)
keepAliveMinutes - see ThreadPoolExecutor.getKeepAliveTime(TimeUnit)public ThreadPoolSupplier.Builder queueCapacity(int queueCapacity)
queueCapacity - capacity of the queue backing the executorpublic ThreadPoolSupplier.Builder daemon(boolean daemon)
daemon - whether the threads are daemon threadspublic ThreadPoolSupplier.Builder threadNamePrefix(java.lang.String threadNamePrefix)
threadNamePrefix - prefix of a thread namepublic ThreadPoolSupplier.Builder prestart(boolean prestart)
prestart - whether to prestart the threadspublic ThreadPoolSupplier.Builder fromConfig(Config config)
config - config located on the key of executor-serviceCopyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.