Package io.micronaut.http.netty.channel
Class KQueueEventLoopGroupFactory
java.lang.Object
io.micronaut.http.netty.channel.KQueueEventLoopGroupFactory
- All Implemented Interfaces:
EventLoopGroupFactory
@Singleton
@Internal
@Requires(classes=io.netty.channel.kqueue.KQueue.class,
condition=KQueueAvailabilityCondition.class)
@Named("native")
public class KQueueEventLoopGroupFactory
extends Object
implements EventLoopGroupFactory
Factory for KQueueEventLoopGroup.
- Author:
- croudet
-
Field Summary
Fields inherited from interface io.micronaut.http.netty.channel.EventLoopGroupFactory
NATIVE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass<? extends io.netty.channel.Channel>
channelClass
(NettyChannelType type) Returns the domain socket server channel class.Class<? extends io.netty.channel.Channel>
channelClass
(NettyChannelType type, @Nullable EventLoopGroupConfiguration configuration) Returns the domain socket server channel class.io.netty.channel.Channel
channelInstance
(NettyChannelType type, @Nullable EventLoopGroupConfiguration configuration) Returns the domain socket server channel class.io.netty.channel.Channel
channelInstance
(NettyChannelType type, EventLoopGroupConfiguration configuration, io.netty.channel.Channel parent, int fd) Returns the channel instance.io.netty.channel.EventLoopGroup
createEventLoopGroup
(int threads, Executor executor, @Nullable Integer ioRatio) Creates a KQueueEventLoopGroup.io.netty.channel.EventLoopGroup
createEventLoopGroup
(int threads, ThreadFactory threadFactory, @Nullable Integer ioRatio) Creates a KQueueEventLoopGroup.boolean
isNative()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.netty.channel.EventLoopGroupFactory
channelInstance, clientSocketChannelClass, clientSocketChannelInstance, createEventLoopGroup, createEventLoopGroup, domainServerSocketChannelClass, domainServerSocketChannelClass, domainServerSocketChannelInstance, serverSocketChannelClass, serverSocketChannelClass, serverSocketChannelInstance
-
Constructor Details
-
KQueueEventLoopGroupFactory
public KQueueEventLoopGroupFactory()
-
-
Method Details
-
createEventLoopGroup
public io.netty.channel.EventLoopGroup createEventLoopGroup(int threads, ThreadFactory threadFactory, @Nullable @Nullable Integer ioRatio) Creates a KQueueEventLoopGroup.- Specified by:
createEventLoopGroup
in interfaceEventLoopGroupFactory
- Parameters:
threads
- The number of threads to use.threadFactory
- The thread factory.ioRatio
- The io ratio.- Returns:
- A KQueueEventLoopGroup.
-
createEventLoopGroup
public io.netty.channel.EventLoopGroup createEventLoopGroup(int threads, Executor executor, @Nullable @Nullable Integer ioRatio) Creates a KQueueEventLoopGroup.- Specified by:
createEventLoopGroup
in interfaceEventLoopGroupFactory
- Parameters:
threads
- The number of threads to use.executor
- An Executor.ioRatio
- The io ratio.- Returns:
- A KQueueEventLoopGroup.
-
isNative
public boolean isNative()- Specified by:
isNative
in interfaceEventLoopGroupFactory
- Returns:
- Is this a native factory.
-
channelClass
public Class<? extends io.netty.channel.Channel> channelClass(NettyChannelType type) throws UnsupportedOperationException Description copied from interface:EventLoopGroupFactory
Returns the domain socket server channel class.- Specified by:
channelClass
in interfaceEventLoopGroupFactory
- Parameters:
type
- Type of the channel to return- Returns:
- A channel class.
- Throws:
UnsupportedOperationException
- if domain sockets are not supported.
-
channelClass
public Class<? extends io.netty.channel.Channel> channelClass(NettyChannelType type, @Nullable @Nullable EventLoopGroupConfiguration configuration) Description copied from interface:EventLoopGroupFactory
Returns the domain socket server channel class.- Specified by:
channelClass
in interfaceEventLoopGroupFactory
- Parameters:
type
- Type of the channel to returnconfiguration
- The configuration- Returns:
- A channel implementation.
-
channelInstance
public io.netty.channel.Channel channelInstance(NettyChannelType type, @Nullable @Nullable EventLoopGroupConfiguration configuration) Description copied from interface:EventLoopGroupFactory
Returns the domain socket server channel class.- Specified by:
channelInstance
in interfaceEventLoopGroupFactory
- Parameters:
type
- Type of the channel to returnconfiguration
- The configuration- Returns:
- A ServerDomainSocketChannel implementation.
-
channelInstance
public io.netty.channel.Channel channelInstance(NettyChannelType type, EventLoopGroupConfiguration configuration, io.netty.channel.Channel parent, int fd) Description copied from interface:EventLoopGroupFactory
Returns the channel instance.- Specified by:
channelInstance
in interfaceEventLoopGroupFactory
- Parameters:
type
- Type of the channel to returnconfiguration
- The configurationparent
- Theparent channel
fd
- The pre-defined file descriptor- Returns:
- A channel implementation.
-