类 EventLoopUtil
java.lang.Object
org.apache.pulsar.common.util.netty.EventLoopUtil
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidenableTriggeredMode(io.netty.bootstrap.ServerBootstrap bootstrap) static Class<? extends io.netty.channel.socket.SocketChannel>getClientSocketChannelClass(io.netty.channel.EventLoopGroup eventLoopGroup) Return a SocketChannel class suitable for the given EventLoopGroup implementation.static Class<? extends io.netty.channel.socket.DatagramChannel>getDatagramChannelClass(io.netty.channel.EventLoopGroup eventLoopGroup) static Class<? extends io.netty.channel.socket.ServerSocketChannel>getServerSocketChannelClass(io.netty.channel.EventLoopGroup eventLoopGroup) static io.netty.channel.EventLoopGroupnewEventLoopGroup(int nThreads, boolean enableBusyWait, ThreadFactory threadFactory) static CompletableFuture<Void>shutdownGracefully(io.netty.channel.EventLoopGroup eventLoopGroup) Shutdowns the EventLoopGroup gracefully.
-
构造器详细资料
-
EventLoopUtil
public EventLoopUtil()
-
-
方法详细资料
-
newEventLoopGroup
public static io.netty.channel.EventLoopGroup newEventLoopGroup(int nThreads, boolean enableBusyWait, ThreadFactory threadFactory) - 返回:
- an EventLoopGroup suitable for the current platform
-
getClientSocketChannelClass
public static Class<? extends io.netty.channel.socket.SocketChannel> getClientSocketChannelClass(io.netty.channel.EventLoopGroup eventLoopGroup) Return a SocketChannel class suitable for the given EventLoopGroup implementation.- 参数:
eventLoopGroup-- 返回:
-
getServerSocketChannelClass
public static Class<? extends io.netty.channel.socket.ServerSocketChannel> getServerSocketChannelClass(io.netty.channel.EventLoopGroup eventLoopGroup) -
getDatagramChannelClass
public static Class<? extends io.netty.channel.socket.DatagramChannel> getDatagramChannelClass(io.netty.channel.EventLoopGroup eventLoopGroup) -
enableTriggeredMode
public static void enableTriggeredMode(io.netty.bootstrap.ServerBootstrap bootstrap) -
shutdownGracefully
public static CompletableFuture<Void> shutdownGracefully(io.netty.channel.EventLoopGroup eventLoopGroup) Shutdowns the EventLoopGroup gracefully. Returns aCompletableFuture- 参数:
eventLoopGroup- the event loop to shutdown- 返回:
- CompletableFuture that completes when the shutdown has completed
-