@Primary @Singleton public class DefaultEventLoopGroupFactory extends java.lang.Object implements EventLoopGroupFactory
EventLoopGroup
instances.NATIVE
Constructor and Description |
---|
DefaultEventLoopGroupFactory(NioEventLoopGroupFactory nioEventLoopGroupFactory,
EventLoopGroupFactory nativeFactory)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class<? extends io.netty.channel.socket.SocketChannel> |
clientSocketChannelClass(EventLoopGroupConfiguration configuration)
Returns the client channel class.
|
io.netty.channel.EventLoopGroup |
createEventLoopGroup(EventLoopGroupConfiguration configuration,
java.util.concurrent.ThreadFactory threadFactory)
Create an event loop group for the given configuration and thread factory.
|
io.netty.channel.EventLoopGroup |
createEventLoopGroup(int threads,
java.util.concurrent.Executor executor,
java.lang.Integer ioRatio)
Creates an EventLoopGroup.
|
io.netty.channel.EventLoopGroup |
createEventLoopGroup(int threads,
java.util.concurrent.ThreadFactory threadFactory,
java.lang.Integer ioRatio)
Creates an EventLoopGroup.
|
java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel> |
serverSocketChannelClass()
Returns the server channel class.
|
java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel> |
serverSocketChannelClass(EventLoopGroupConfiguration configuration)
Returns the server channel class.
|
protected void |
setUseNativeTransport(java.lang.Boolean useNativeTransport)
Deprecated.
Use
DefaultEventLoopGroupConfiguration instead and micronaut.netty.event-loops.default.prefer-native-transport |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createEventLoopGroup, createEventLoopGroup, isNative
public DefaultEventLoopGroupFactory(NioEventLoopGroupFactory nioEventLoopGroupFactory, @Nullable @Named(value="native") EventLoopGroupFactory nativeFactory)
nioEventLoopGroupFactory
- The NIO factorynativeFactory
- The native factory if available@Deprecated @Inject protected void setUseNativeTransport(@Property(name="micronaut.server.netty.use-native-transport") @Nullable java.lang.Boolean useNativeTransport)
DefaultEventLoopGroupConfiguration
instead and micronaut.netty.event-loops.default.prefer-native-transport
useNativeTransport
- Whether to use native transportpublic io.netty.channel.EventLoopGroup createEventLoopGroup(EventLoopGroupConfiguration configuration, java.util.concurrent.ThreadFactory threadFactory)
EventLoopGroupFactory
createEventLoopGroup
in interface EventLoopGroupFactory
configuration
- The configurationthreadFactory
- The thread factorypublic io.netty.channel.EventLoopGroup createEventLoopGroup(int threads, java.util.concurrent.Executor executor, @Nullable java.lang.Integer ioRatio)
EventLoopGroupFactory
createEventLoopGroup
in interface EventLoopGroupFactory
threads
- The number of threads to use.executor
- An Executor.ioRatio
- The io ratio.public io.netty.channel.EventLoopGroup createEventLoopGroup(int threads, @Nullable java.util.concurrent.ThreadFactory threadFactory, @Nullable java.lang.Integer ioRatio)
EventLoopGroupFactory
createEventLoopGroup
in interface EventLoopGroupFactory
threads
- The number of threads to use.threadFactory
- The thread factory.ioRatio
- The io ratio.public java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel> serverSocketChannelClass()
EventLoopGroupFactory
serverSocketChannelClass
in interface EventLoopGroupFactory
@NonNull public java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel> serverSocketChannelClass(EventLoopGroupConfiguration configuration)
EventLoopGroupFactory
serverSocketChannelClass
in interface EventLoopGroupFactory
configuration
- The configuration@NonNull public java.lang.Class<? extends io.netty.channel.socket.SocketChannel> clientSocketChannelClass(@Nullable EventLoopGroupConfiguration configuration)
EventLoopGroupFactory
clientSocketChannelClass
in interface EventLoopGroupFactory
configuration
- The configuration