public class NettyEventLoopUtil extends Object
| 构造器和说明 |
|---|
NettyEventLoopUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
enableTriggeredMode(io.netty.bootstrap.ServerBootstrap serverBootstrap)
Use
EpollMode.LEVEL_TRIGGERED for server bootstrap if level trigger enabled by system properties,
otherwise use EpollMode.EDGE_TRIGGERED. |
static Class<? extends io.netty.channel.socket.SocketChannel> |
getClientSocketChannelClass() |
static Class<? extends io.netty.channel.socket.ServerSocketChannel> |
getServerSocketChannelClass() |
static io.netty.channel.EventLoopGroup |
newEventLoopGroup(int nThreads,
ThreadFactory threadFactory)
Create the right event loop according to current platform and system property, fallback to NIO when epoll not enabled.
|
public static io.netty.channel.EventLoopGroup newEventLoopGroup(int nThreads,
ThreadFactory threadFactory)
nThreads - threadFactory - public static Class<? extends io.netty.channel.socket.SocketChannel> getClientSocketChannelClass()
public static Class<? extends io.netty.channel.socket.ServerSocketChannel> getServerSocketChannelClass()
public static void enableTriggeredMode(io.netty.bootstrap.ServerBootstrap serverBootstrap)
EpollMode.LEVEL_TRIGGERED for server bootstrap if level trigger enabled by system properties,
otherwise use EpollMode.EDGE_TRIGGERED.serverBootstrap - server bootstrapCopyright © 2021. All rights reserved.