Interface EventLoopGroupConfiguration

All Superinterfaces:
Named
All Known Implementing Classes:
DefaultEventLoopGroupConfiguration, NettyHttpServerConfiguration.EventLoopConfig, NettyHttpServerConfiguration.Parent, NettyHttpServerConfiguration.Worker

public interface EventLoopGroupConfiguration extends Named
Default event loop group configuration interface.
Since:
2.0
Author:
graemerocher
  • Field Details

    • EVENT_LOOPS

      static final String EVENT_LOOPS
      The configuration property prefix.
      See Also:
    • DEFAULT

      static final String DEFAULT
      The name of the default event loop group configuration.
      See Also:
    • DEFAULT_LOOP

      static final String DEFAULT_LOOP
      The default.
      See Also:
    • DEFAULT_THREAD_CORE_RATIO

      static final double DEFAULT_THREAD_CORE_RATIO
      See Also:
    • DEFAULT_SHUTDOWN_QUIET_PERIOD

      static final long DEFAULT_SHUTDOWN_QUIET_PERIOD
      The default shutdown quiet period in seconds. Implementation note: defaults are from io.netty.util.concurrent.AbstractEventExecutor
      See Also:
    • DEFAULT_SHUTDOWN_TIMEOUT

      static final long DEFAULT_SHUTDOWN_TIMEOUT
      The default shutdown quiet period. Implementation note: defaults are from io.netty.util.concurrent.AbstractEventExecutor
      See Also:
  • Method Details

    • getNumThreads

      int getNumThreads()
      Returns:
      The number of threads for the event loop, or 0 to use getThreadCoreRatio()
    • getThreadCoreRatio

      default double getThreadCoreRatio()
      The number of threads per core to use if getNumThreads() is set to 0.
      Returns:
      The thread-to-core ratio
      Since:
      4.8.0
    • getIoRatio

      Optional<Integer> getIoRatio()
      Returns:
      The I/O ratio.
    • getExecutorName

      Optional<String> getExecutorName()
      Returns:
      The name of the executor to use.
    • isPreferNativeTransport

      @Deprecated(since="4.10.0", forRemoval=true) boolean isPreferNativeTransport()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      Whether to prefer the native transport
    • getTransport

      @NonNull @NextMajorVersion("Change default to all transports") default @NonNull List<String> getTransport()
      The transports to use for this event loop, in order of preference. Supported values are io_uring,epoll,kqueue,nio. The first available transport out of those listed will be used (nio is always available). If no listed transport is available, an exception will be thrown.

      By default, only nio is used, even if native transports are available. If the legacy prefer-native-transport property is set to true, this defaults to io_uring,epoll,kqueue,nio.

      Returns:
      The available transports, in order of preference
    • getShutdownQuietPeriod

      default Duration getShutdownQuietPeriod()
      Returns:
      The shutdown quiet period
    • getShutdownTimeout

      default Duration getShutdownTimeout()
      Returns:
      The shutdown timeout (must be >= shutdownQuietPeriod)
    • isLoomCarrier

      default boolean isLoomCarrier()
      Returns:
      When set to true, use a special experimental event loop that can also execute virtual threads, in order to improve virtual thread performance.