public final class EventLoopGroups extends Object
EventLoopGroup.| Modifier and Type | Method and Description |
|---|---|
static Class<? extends io.netty.channel.socket.DatagramChannel> |
datagramChannelType(io.netty.channel.EventLoopGroup eventLoopGroup)
Returns the available
DatagramChannel class for eventLoopGroup, for use in configuring a
custom Bootstrap. |
static io.netty.channel.EventLoop |
directEventLoop()
Returns a special
EventLoop which executes submitted tasks in the caller thread. |
static io.netty.channel.EventLoopGroup |
newEventLoopGroup(int numThreads)
Returns a newly-created
EventLoopGroup. |
static io.netty.channel.EventLoopGroup |
newEventLoopGroup(int numThreads,
boolean useDaemonThreads)
Returns a newly-created
EventLoopGroup. |
static io.netty.channel.EventLoopGroup |
newEventLoopGroup(int numThreads,
String threadNamePrefix)
Returns a newly-created
EventLoopGroup. |
static io.netty.channel.EventLoopGroup |
newEventLoopGroup(int numThreads,
String threadNamePrefix,
boolean useDaemonThreads)
Returns a newly-created
EventLoopGroup. |
static io.netty.channel.EventLoopGroup |
newEventLoopGroup(int numThreads,
ThreadFactory threadFactory)
Returns a newly-created
EventLoopGroup. |
static Class<? extends io.netty.channel.ServerChannel> |
serverChannelClass(io.netty.channel.EventLoopGroup eventLoopGroup)
Deprecated.
|
static Class<? extends io.netty.channel.ServerChannel> |
serverChannelType(io.netty.channel.EventLoopGroup eventLoopGroup)
Returns the
ServerChannel class that is available for this eventLoopGroup, for use in
configuring a custom Bootstrap. |
static Class<? extends io.netty.channel.socket.SocketChannel> |
socketChannelType(io.netty.channel.EventLoopGroup eventLoopGroup)
Returns the available
SocketChannel class for eventLoopGroup, for use in configuring a
custom Bootstrap. |
public static io.netty.channel.EventLoopGroup newEventLoopGroup(int numThreads)
EventLoopGroup.numThreads - the number of event loop threadspublic static io.netty.channel.EventLoopGroup newEventLoopGroup(int numThreads,
boolean useDaemonThreads)
EventLoopGroup.numThreads - the number of event loop threadsuseDaemonThreads - whether to create daemon threads or notpublic static io.netty.channel.EventLoopGroup newEventLoopGroup(int numThreads,
String threadNamePrefix)
EventLoopGroup.numThreads - the number of event loop threadsthreadNamePrefix - the prefix of thread namespublic static io.netty.channel.EventLoopGroup newEventLoopGroup(int numThreads,
String threadNamePrefix,
boolean useDaemonThreads)
EventLoopGroup.numThreads - the number of event loop threadsthreadNamePrefix - the prefix of thread namesuseDaemonThreads - whether to create daemon threads or notpublic static io.netty.channel.EventLoopGroup newEventLoopGroup(int numThreads,
ThreadFactory threadFactory)
EventLoopGroup.numThreads - the number of event loop threadsthreadFactory - the factory of event loop threadspublic static io.netty.channel.EventLoop directEventLoop()
EventLoop which executes submitted tasks in the caller thread.
Note that this EventLoop will raise an UnsupportedOperationException for any operations
related with EventLoop shutdown or Channel registration.public static Class<? extends io.netty.channel.ServerChannel> serverChannelType(io.netty.channel.EventLoopGroup eventLoopGroup)
ServerChannel class that is available for this eventLoopGroup, for use in
configuring a custom Bootstrap.@Deprecated public static Class<? extends io.netty.channel.ServerChannel> serverChannelClass(io.netty.channel.EventLoopGroup eventLoopGroup)
serverChannelType(EventLoopGroup).ServerChannel class that is available for this eventLoopGroup, for use in
configuring a custom Bootstrap.public static Class<? extends io.netty.channel.socket.SocketChannel> socketChannelType(io.netty.channel.EventLoopGroup eventLoopGroup)
SocketChannel class for eventLoopGroup, for use in configuring a
custom Bootstrap.public static Class<? extends io.netty.channel.socket.DatagramChannel> datagramChannelType(io.netty.channel.EventLoopGroup eventLoopGroup)
DatagramChannel class for eventLoopGroup, for use in configuring a
custom Bootstrap.Copyright © 2020 LeanCloud. All rights reserved.