Package org.drasyl.node
Class DrasylNodeSharedEventLoopGroupHolder
java.lang.Object
org.drasyl.node.DrasylNodeSharedEventLoopGroupHolder
Holds parent and child
EventLoop
s that are shared across all DrasylNode
s.
https://github.com/netty/netty/issues/639#issuecomment-9263566
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.netty.channel.nio.NioEventLoopGroup
static io.netty.channel.nio.NioEventLoopGroup
static CompletableFuture<Void>
shutdown()
Shutdown the two schedulers.
-
Field Details
-
PARENT_DEFAULT_THREADS
public static final int PARENT_DEFAULT_THREADS -
CHILD_DEFAULT_THREADS
public static final int CHILD_DEFAULT_THREADS
-
-
Method Details
-
getParentGroup
public static io.netty.channel.nio.NioEventLoopGroup getParentGroup()Use thisNioEventLoopGroup
for theDrasylNode
'sServerChannel
. By default the group hasPARENT_DEFAULT_THREADS
threads. This number can be changed by using the java system propertyorg.drasyl.event-loop.parent
.- Returns:
- a
NioEventLoopGroup
for parent channels
-
getChildGroup
public static io.netty.channel.nio.NioEventLoopGroup getChildGroup()Use thisNioEventLoopGroup
for theDrasylNode
'sServerChannel
. By default the group hasCHILD_DEFAULT_THREADS
threads. This number can be changed by using the java system propertyorg.drasyl.event-loop.child
.- Returns:
- a
NioEventLoopGroup
for child channels
-
shutdown
Shutdown the two schedulers.This operation cannot be undone. After performing this operation, no new task can be submitted!
-