Class NettyHttpServerConfiguration.EventLoopConfig

java.lang.Object
io.micronaut.http.server.netty.configuration.NettyHttpServerConfiguration.EventLoopConfig
All Implemented Interfaces:
io.micronaut.core.naming.Named, io.micronaut.http.netty.channel.EventLoopGroupConfiguration
Direct Known Subclasses:
NettyHttpServerConfiguration.Parent, NettyHttpServerConfiguration.Worker
Enclosing class:
NettyHttpServerConfiguration

public abstract static class NettyHttpServerConfiguration.EventLoopConfig extends Object implements io.micronaut.http.netty.channel.EventLoopGroupConfiguration
Abstract class for configuring the Netty event loop.
  • Method Details

    • getName

      @NonNull public @NonNull String getName()
      Specified by:
      getName in interface io.micronaut.core.naming.Named
    • setEventLoopGroup

      public void setEventLoopGroup(String name)
      Sets the name to use.
      Parameters:
      name - The name
    • setThreads

      public void setThreads(int threads)
      Sets the number of threads for the event loop group.
      Parameters:
      threads - The number of threads
    • setIoRatio

      public void setIoRatio(Integer ioRatio)
      Sets the I/O ratio.
      Parameters:
      ioRatio - The I/O ratio
    • setExecutor

      public void setExecutor(String executor)
      Sets the name of the executor.
      Parameters:
      executor - The executor
    • setPreferNativeTransport

      public void setPreferNativeTransport(boolean preferNativeTransport)
      Parameters:
      preferNativeTransport - Set whether to prefer the native transport if available
    • setShutdownQuietPeriod

      public void setShutdownQuietPeriod(Duration shutdownQuietPeriod)
      Parameters:
      shutdownQuietPeriod - Set the shutdown quiet period
    • setShutdownTimeout

      public void setShutdownTimeout(Duration shutdownTimeout)
      Parameters:
      shutdownTimeout - Set the shutdown timeout (must be >= shutdownQuietPeriod)
    • getNumOfThreads

      public int getNumOfThreads()
      Returns:
      The number of threads to use
    • getIoRatio

      public Optional<Integer> getIoRatio()
      Specified by:
      getIoRatio in interface io.micronaut.http.netty.channel.EventLoopGroupConfiguration
      Returns:
      The I/O ratio to use
    • getExecutorName

      public Optional<String> getExecutorName()
      Specified by:
      getExecutorName in interface io.micronaut.http.netty.channel.EventLoopGroupConfiguration
      Returns:
      The name of the configured executor to use
    • getNumThreads

      public int getNumThreads()
      Specified by:
      getNumThreads in interface io.micronaut.http.netty.channel.EventLoopGroupConfiguration
    • isPreferNativeTransport

      public boolean isPreferNativeTransport()
      Specified by:
      isPreferNativeTransport in interface io.micronaut.http.netty.channel.EventLoopGroupConfiguration
    • getShutdownQuietPeriod

      public Duration getShutdownQuietPeriod()
      Specified by:
      getShutdownQuietPeriod in interface io.micronaut.http.netty.channel.EventLoopGroupConfiguration
    • getShutdownTimeout

      public Duration getShutdownTimeout()
      Specified by:
      getShutdownTimeout in interface io.micronaut.http.netty.channel.EventLoopGroupConfiguration