config.io_helidon_common_configurable_ThreadPoolConfig.adoc Maven / Gradle / Ivy
///////////////////////////////////////////////////////////////////////////////
Copyright (c) 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
///////////////////////////////////////////////////////////////////////////////
ifndef::rootdir[:rootdir: {docdir}/..]
:description: Configuration of io.helidon.common.configurable.ThreadPoolSupplier
:keywords: helidon, config, io.helidon.common.configurable.ThreadPoolSupplier
:basic-table-intro: The table below lists the configuration keys that configure io.helidon.common.configurable.ThreadPoolSupplier
include::{rootdir}/includes/attributes.adoc[]
= ThreadPoolSupplier (common.configurable) Configuration
// tag::config[]
Type: link:{javadoc-base-url}/io.helidon.common.configurable/io/helidon/common/configurable/ThreadPoolSupplier.html[io.helidon.common.configurable.ThreadPoolSupplier]
== Configuration options
.Optional configuration options
[cols="3,3a,2,5a"]
|===
|key |type |default value |description
|`core-pool-size` |int |`10` |Core pool size of the thread pool executor.
Defaults to `DEFAULT_CORE_POOL_SIZE`.
@return corePoolSize see java.util.concurrent.ThreadPoolExecutor#getCorePoolSize()
|`growth-rate` |int |`0` |The percentage of task submissions that should result in adding threads, expressed as a value from 1 to 100. The
rate applies only when all of the following are true:
- the pool size is below the maximum, and
- there are no idle threads, and
- the number of tasks in the queue exceeds the `growthThreshold`
For example, a rate of 20 means that while these conditions are met one thread will be added for every 5 submitted
tasks.
Defaults to `DEFAULT_GROWTH_RATE`
@return the growth rate
|`growth-threshold` |int |`1000` |The queue size above which pool growth will be considered if the pool is not fixed size.
Defaults to `DEFAULT_GROWTH_THRESHOLD`.
@return the growth threshold
|`is-daemon` |boolean |`true` |Is daemon of the thread pool executor.
Defaults to `DEFAULT_IS_DAEMON`.
@return whether the threads are daemon threads
|`keep-alive` |Duration |`PT3M` |Keep alive of the thread pool executor.
Defaults to `DEFAULT_KEEP_ALIVE`.
@return keep alive see java.util.concurrent.ThreadPoolExecutor#getKeepAliveTime(java.util.concurrent.TimeUnit)
|`max-pool-size` |int |`50` |Max pool size of the thread pool executor.
Defaults to `DEFAULT_MAX_POOL_SIZE`.
@return maxPoolSize see java.util.concurrent.ThreadPoolExecutor#getMaximumPoolSize()
|`name` |string |{nbsp} |Name of this thread pool executor.
@return the pool name
|`queue-capacity` |int |`10000` |Queue capacity of the thread pool executor.
Defaults to `DEFAULT_QUEUE_CAPACITY`.
@return capacity of the queue backing the executor
|`should-prestart` |boolean |`true` |Whether to prestart core threads in this thread pool executor.
Defaults to `DEFAULT_PRESTART`.
@return whether to prestart the threads
|`thread-name-prefix` |string |{nbsp} |Name prefix for threads in this thread pool executor.
Defaults to `DEFAULT_THREAD_NAME_PREFIX`.
@return prefix of a thread name
|`virtual-threads` |boolean |{nbsp} |When configured to `true`, an unbounded virtual executor service (project Loom) will be used.
If enabled, all other configuration options of this executor service are ignored!
@return whether to use virtual threads or not, defaults to `false`
|===
// end::config[]
© 2015 - 2025 Weber Informatics LLC | Privacy Policy