public final class NettyIoExecutors
extends java.lang.Object
NettyIoExecutor
.Modifier and Type | Method and Description |
---|---|
static io.netty.channel.EventLoopGroup |
createEventLoopGroup(int ioThreads,
java.util.concurrent.ThreadFactory threadFactory)
Create a new
EventLoopGroup . |
static NettyIoExecutor |
createIoExecutor(int ioThreads,
java.util.concurrent.ThreadFactory threadFactory)
Create a new
NettyIoExecutor . |
static NettyIoExecutor |
createIoExecutor(java.util.concurrent.ThreadFactory threadFactory)
Create a new
NettyIoExecutor with the default number of ioThreads . |
static NettyIoExecutor |
fromNettyEventLoop(io.netty.channel.EventLoop eventLoop)
Creates a new instance of
NettyIoExecutor using the passed EventLoop . |
static NettyIoExecutor |
fromNettyEventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup)
Creates a new instance of
NettyIoExecutor using the passed EventLoopGroup . |
static NettyIoExecutor |
toNettyIoExecutor(IoExecutor ioExecutor)
Attempts to convert the passed
IoExecutor to a NettyIoExecutor . |
public static NettyIoExecutor createIoExecutor(java.util.concurrent.ThreadFactory threadFactory)
NettyIoExecutor
with the default number of ioThreads
.threadFactory
- the ThreadFactory
to use.IoExecutor
public static NettyIoExecutor createIoExecutor(int ioThreads, java.util.concurrent.ThreadFactory threadFactory)
NettyIoExecutor
.ioThreads
- number of threads.threadFactory
- the ThreadFactory
to use.IoExecutor
public static io.netty.channel.EventLoopGroup createEventLoopGroup(int ioThreads, java.util.concurrent.ThreadFactory threadFactory)
EventLoopGroup
.ioThreads
- number of threadsthreadFactory
- the ThreadFactory
to use.IoExecutor
public static NettyIoExecutor toNettyIoExecutor(IoExecutor ioExecutor)
IoExecutor
to a NettyIoExecutor
.ioExecutor
- IoExecutor
to convert.NettyIoExecutor
corresponding to the passed IoExecutor
.java.lang.IllegalArgumentException
- If IoExecutor
is not of type NettyIoExecutor
.public static NettyIoExecutor fromNettyEventLoop(io.netty.channel.EventLoop eventLoop)
NettyIoExecutor
using the passed EventLoop
.eventLoop
- EventLoop
to use to create a new NettyIoExecutor
.NettyIoExecutor
using the passed EventLoop
.public static NettyIoExecutor fromNettyEventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup)
NettyIoExecutor
using the passed EventLoopGroup
.eventLoopGroup
- EventLoopGroup
to use to create a new NettyIoExecutor
.NettyIoExecutor
using the passed EventLoopGroup
.