public abstract static class NettyHttpServerConfiguration.EventLoopConfig extends Object implements EventLoopGroupConfiguration
DEFAULT, DEFAULT_LOOP, DEFAULT_SHUTDOWN_QUIET_PERIOD, DEFAULT_SHUTDOWN_TIMEOUT, EVENT_LOOPS
Modifier and Type | Method and Description |
---|---|
Optional<String> |
getExecutorName() |
Optional<Integer> |
getIoRatio() |
String |
getName() |
int |
getNumOfThreads() |
int |
getNumThreads() |
Duration |
getShutdownQuietPeriod() |
Duration |
getShutdownTimeout() |
boolean |
isPreferNativeTransport() |
void |
setEventLoopGroup(String name)
Sets the name to use.
|
void |
setExecutor(String executor)
Sets the name of the executor.
|
void |
setIoRatio(Integer ioRatio)
Sets the I/O ratio.
|
void |
setPreferNativeTransport(boolean preferNativeTransport) |
void |
setShutdownQuietPeriod(Duration shutdownQuietPeriod) |
void |
setShutdownTimeout(Duration shutdownTimeout) |
void |
setThreads(int threads)
Sets the number of threads for the event loop group.
|
public void setEventLoopGroup(String name)
name
- The namepublic void setThreads(int threads)
threads
- The number of threadspublic void setIoRatio(Integer ioRatio)
ioRatio
- The I/O ratiopublic void setExecutor(String executor)
executor
- The executorpublic void setPreferNativeTransport(boolean preferNativeTransport)
preferNativeTransport
- Set whether to prefer the native transport if availablepublic void setShutdownQuietPeriod(Duration shutdownQuietPeriod)
shutdownQuietPeriod
- Set the shutdown quiet periodpublic void setShutdownTimeout(Duration shutdownTimeout)
shutdownTimeout
- Set the shutdown timeout (must be >= shutdownQuietPeriod)public int getNumOfThreads()
public Optional<Integer> getIoRatio()
getIoRatio
in interface EventLoopGroupConfiguration
public Optional<String> getExecutorName()
getExecutorName
in interface EventLoopGroupConfiguration
public int getNumThreads()
getNumThreads
in interface EventLoopGroupConfiguration
public boolean isPreferNativeTransport()
isPreferNativeTransport
in interface EventLoopGroupConfiguration
public Duration getShutdownQuietPeriod()
getShutdownQuietPeriod
in interface EventLoopGroupConfiguration
public Duration getShutdownTimeout()
getShutdownTimeout
in interface EventLoopGroupConfiguration