Class VirtualThreadsConfig

    • Field Detail

      • 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 @RunOnVirtualThread are 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.

    • Constructor Detail

      • VirtualThreadsConfig

        public VirtualThreadsConfig()