@ConfigRoot(phase=RUN_TIME) public class ThreadPoolConfig extends Object
Modifier and Type | Field and Description |
---|---|
int |
coreThreads
The core thread pool size.
|
float |
growthResistance
The executor growth resistance.
|
Duration |
keepAliveTime
The amount of time a thread will stay alive with no work.
|
OptionalInt |
maxThreads
The maximum number of threads.
|
OptionalInt |
queueSize
The queue size.
|
Optional<Duration> |
shutdownCheckInterval
The frequency at which the status of the thread pool should be checked during shutdown.
|
Duration |
shutdownInterrupt
The amount of time to wait for thread pool shutdown before tasks should be interrupted.
|
Duration |
shutdownTimeout
The shutdown timeout.
|
Constructor and Description |
---|
ThreadPoolConfig() |
@ConfigItem(defaultValue="1") public int coreThreads
@ConfigItem public OptionalInt maxThreads
@ConfigItem public OptionalInt queueSize
@ConfigItem(defaultValue="0") public float growthResistance
0.0f
implies that
threads beyond the core size should be created as aggressively as threads within it; a value of 1.0f
implies that threads beyond the core size should never be created.@ConfigItem(defaultValue="1M") public Duration shutdownTimeout
@ConfigItem(defaultValue="10") public Duration shutdownInterrupt
shutdownTimeout
, then tasks will not be interrupted before
the shutdown timeout occurs.@ConfigItem(defaultValue="5") public Optional<Duration> shutdownCheckInterval
@ConfigItem(defaultValue="30") public Duration keepAliveTime
Copyright © 2019 JBoss by Red Hat. All rights reserved.