@@ -16,14 +16,13 @@ package org.apache.pekko.remote.testconductor
16
16
import java .net .InetSocketAddress
17
17
import java .util .concurrent .TimeUnit
18
18
19
- import scala .annotation .nowarn
20
19
import scala .util .control .NonFatal
21
20
22
21
import io .netty .bootstrap .{ Bootstrap , ServerBootstrap }
23
22
import io .netty .buffer .{ ByteBuf , ByteBufUtil }
24
23
import io .netty .channel ._
25
24
import io .netty .channel .ChannelHandler .Sharable
26
- import io .netty .channel .nio .NioEventLoopGroup
25
+ import io .netty .channel .nio .NioIoHandler
27
26
import io .netty .channel .socket .SocketChannel
28
27
import io .netty .channel .socket .nio .{ NioServerSocketChannel , NioSocketChannel }
29
28
import io .netty .handler .codec .{
@@ -115,7 +114,6 @@ private[pekko] trait RemoteConnection {
115
114
/**
116
115
* INTERNAL API.
117
116
*/
118
- @ nowarn(" msg=deprecated" )
119
117
private [pekko] object RemoteConnection {
120
118
def apply (
121
119
role : Role ,
@@ -125,7 +123,7 @@ private[pekko] object RemoteConnection {
125
123
role match {
126
124
case Client =>
127
125
val bootstrap = new Bootstrap ()
128
- val eventLoopGroup = new NioEventLoopGroup (poolSize)
126
+ val eventLoopGroup = new MultiThreadIoEventLoopGroup (poolSize, NioIoHandler .newFactory() )
129
127
val cf = bootstrap
130
128
.group(eventLoopGroup)
131
129
.channel(classOf [NioSocketChannel ])
@@ -150,8 +148,9 @@ private[pekko] object RemoteConnection {
150
148
151
149
case Server =>
152
150
val bootstrap = new ServerBootstrap ()
153
- val parentEventLoopGroup = new NioEventLoopGroup (poolSize)
154
- val childEventLoopGroup = new NioEventLoopGroup (poolSize)
151
+ val ioHandlerFactory = NioIoHandler .newFactory()
152
+ val parentEventLoopGroup = new MultiThreadIoEventLoopGroup (poolSize, ioHandlerFactory)
153
+ val childEventLoopGroup = new MultiThreadIoEventLoopGroup (poolSize, ioHandlerFactory)
155
154
val cf = bootstrap
156
155
.group(parentEventLoopGroup, childEventLoopGroup)
157
156
.channel(classOf [NioServerSocketChannel ])
0 commit comments