@EachProperty(value="micronaut.netty.event-loops", primary="default") public class DefaultEventLoopGroupConfiguration extends Object implements EventLoopGroupConfiguration
DEFAULT, DEFAULT_LOOP, DEFAULT_SHUTDOWN_QUIET_PERIOD, DEFAULT_SHUTDOWN_TIMEOUT, EVENT_LOOPS
Constructor and Description |
---|
DefaultEventLoopGroupConfiguration()
Default constructor.
|
DefaultEventLoopGroupConfiguration(String name,
int numThreads,
Integer ioRatio,
boolean preferNativeTransport,
String executor,
Duration shutdownQuietPeriod,
Duration shutdownTimeout)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Optional<String> |
getExecutorName() |
Optional<Integer> |
getIoRatio() |
String |
getName() |
int |
getNumThreads() |
Duration |
getShutdownQuietPeriod() |
Duration |
getShutdownTimeout() |
boolean |
isPreferNativeTransport() |
@ConfigurationInject public DefaultEventLoopGroupConfiguration(@Parameter String name, @Bindable(defaultValue="0") int numThreads, @Nullable Integer ioRatio, @Bindable(defaultValue="false") boolean preferNativeTransport, @Nullable String executor, @Nullable Duration shutdownQuietPeriod, @Nullable Duration shutdownTimeout)
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)public DefaultEventLoopGroupConfiguration()
public int getNumThreads()
getNumThreads
in interface EventLoopGroupConfiguration
public Optional<Integer> getIoRatio()
getIoRatio
in interface EventLoopGroupConfiguration
public Optional<String> getExecutorName()
getExecutorName
in interface EventLoopGroupConfiguration
public boolean isPreferNativeTransport()
isPreferNativeTransport
in interface EventLoopGroupConfiguration
public Duration getShutdownQuietPeriod()
getShutdownQuietPeriod
in interface EventLoopGroupConfiguration
public Duration getShutdownTimeout()
getShutdownTimeout
in interface EventLoopGroupConfiguration