Package io.micronaut.http.netty.channel
Class DefaultEventLoopGroupConfiguration
java.lang.Object
io.micronaut.http.netty.channel.DefaultEventLoopGroupConfiguration
- All Implemented Interfaces:
io.micronaut.core.naming.Named,EventLoopGroupConfiguration
@EachProperty(value="micronaut.netty.event-loops",
primary="default")
public class DefaultEventLoopGroupConfiguration
extends Object
implements EventLoopGroupConfiguration
Configuration interface for event loop configuration.
- Since:
- 2.0
-
Field Summary
Fields inherited from interface io.micronaut.http.netty.channel.EventLoopGroupConfiguration
DEFAULT, DEFAULT_LOOP, DEFAULT_SHUTDOWN_QUIET_PERIOD, DEFAULT_SHUTDOWN_TIMEOUT, EVENT_LOOPS -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DefaultEventLoopGroupConfiguration
@ConfigurationInject public DefaultEventLoopGroupConfiguration(@Parameter String name, @Bindable(defaultValue="0") int numThreads, @Nullable @Nullable Integer ioRatio, @Bindable(defaultValue="false") boolean preferNativeTransport, @Nullable @Nullable String executor, @Nullable @Nullable Duration shutdownQuietPeriod, @Nullable @Nullable Duration shutdownTimeout) Default constructor.- Parameters:
name- The name of the groupnumThreads- The number of threadsioRatio- The IO ratio (optional)preferNativeTransport- Whether native transport is to be preferredexecutor- A named executor service to use (optional)shutdownQuietPeriod- The shutdown quiet periodshutdownTimeout- The shutdown timeout (must be >= shutdownQuietPeriod)
-
DefaultEventLoopGroupConfiguration
public DefaultEventLoopGroupConfiguration()Default constructor.
-
-
Method Details
-
getNumThreads
public int getNumThreads()- Specified by:
getNumThreadsin interfaceEventLoopGroupConfiguration- Returns:
- The number of threads for the event loop
-
getIoRatio
- Specified by:
getIoRatioin interfaceEventLoopGroupConfiguration- Returns:
- The I/O ratio.
-
getExecutorName
- Specified by:
getExecutorNamein interfaceEventLoopGroupConfiguration- Returns:
- The name of the executor to use.
-
isPreferNativeTransport
public boolean isPreferNativeTransport()- Specified by:
isPreferNativeTransportin interfaceEventLoopGroupConfiguration- Returns:
- Whether to prefer the native transport
-
getName
- Specified by:
getNamein interfaceio.micronaut.core.naming.Named
-
getShutdownQuietPeriod
- Specified by:
getShutdownQuietPeriodin interfaceEventLoopGroupConfiguration- Returns:
- The shutdown quiet period
-
getShutdownTimeout
- Specified by:
getShutdownTimeoutin interfaceEventLoopGroupConfiguration- Returns:
- The shutdown timeout (must be >= shutdownQuietPeriod)
-