Interface EventLoopGroupConfiguration
- All Superinterfaces:
Named
- All Known Implementing Classes:
DefaultEventLoopGroupConfiguration, NettyHttpServerConfiguration.EventLoopConfig, NettyHttpServerConfiguration.Parent, NettyHttpServerConfiguration.Worker
Default event loop group configuration interface.
- Since:
- 2.0
- Author:
- graemerocher
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the default event loop group configuration.static final StringThe default.static final longThe default shutdown quiet period in seconds.static final longThe default shutdown quiet period.static final doubleDefaultgetThreadCoreRatio().static final StringThe configuration property prefix. -
Method Summary
Modifier and TypeMethodDescriptionintdefault Durationdefault Durationdefault doubleThe number of threads per core to use ifgetNumThreads()is set to 0.The transports to use for this event loop, in order of preference.default booleanbooleanDeprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
EVENT_LOOPS
-
DEFAULT
-
DEFAULT_LOOP
-
DEFAULT_THREAD_CORE_RATIO
-
DEFAULT_SHUTDOWN_QUIET_PERIOD
static final long DEFAULT_SHUTDOWN_QUIET_PERIODThe 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_TIMEOUTThe 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 ifgetNumThreads()is set to 0.- Returns:
- The thread-to-core ratio
- Since:
- 4.8.0
-
getIoRatio
-
getExecutorName
-
isPreferNativeTransport
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- Whether to prefer the native transport
-
getTransport
The transports to use for this event loop, in order of preference. Supported values areio_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
niois used, even if native transports are available. If the legacyprefer-native-transportproperty is set totrue, this defaults toio_uring,epoll,kqueue,nio.- Returns:
- The available transports, in order of preference
-
getShutdownQuietPeriod
- Returns:
- The shutdown quiet period
-
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.
-