Package io.quarkus.virtual.threads
Class VirtualThreadsConfig
- java.lang.Object
-
- io.quarkus.virtual.threads.VirtualThreadsConfig
-
@ConfigRoot(phase=BUILD_AND_RUN_TIME_FIXED) public class VirtualThreadsConfig extends Object
-
-
Field Summary
Fields Modifier and Type Field Description booleanenabledA flag to explicitly disabled virtual threads, even if the JVM support them.(package private) Optional<String>namePrefixVirtual thread name prefix.Optional<Duration>shutdownCheckIntervalThe frequency at which the status of the executor service should be checked during shutdown.DurationshutdownTimeoutThe shutdown timeout.
-
Constructor Summary
Constructors Constructor Description VirtualThreadsConfig()
-
-
-
Field Detail
-
namePrefix
@ConfigItem(defaultValue="quarkus-virtual-thread-") Optional<String> namePrefix
Virtual thread name prefix. If left blank virtual threads will be unnamed.
-
shutdownTimeout
@ConfigItem(defaultValue="1M") public Duration shutdownTimeout
The shutdown timeout. If all pending work has not been completed by this time then any pending tasks will be interrupted, and the shutdown process will continue
-
shutdownCheckInterval
@ConfigItem(defaultValue="5s") public Optional<Duration> shutdownCheckInterval
The frequency at which the status of the executor service should be checked during shutdown. Setting this key to an empty value disables the shutdown check interval.
-
enabled
@ConfigItem(defaultValue="true") public boolean enabled
A flag to explicitly disabled virtual threads, even if the JVM support them. In this case, methods annotated with@RunOnVirtualThreadare executed on the worker thread pool.This flag is intended to be used when running with virtual threads become more expensive than plain worker threads, because of pinning, monopolization or thread-based object pool.
-
-