|
15 | 15 | */ |
16 | 16 | package org.asynchttpclient.netty.channel; |
17 | 17 |
|
18 | | -import io.netty.incubator.channel.uring.IOUring; |
19 | | -import io.netty.incubator.channel.uring.IOUringEventLoopGroup; |
20 | | -import io.netty.incubator.channel.uring.IOUringSocketChannel; |
| 18 | +import io.netty.channel.MultiThreadIoEventLoopGroup; |
| 19 | +import io.netty.channel.uring.IoUring; |
| 20 | +import io.netty.channel.uring.IoUringIoHandler; |
| 21 | +import io.netty.channel.uring.IoUringSocketChannel; |
21 | 22 |
|
22 | 23 | import java.util.concurrent.ThreadFactory; |
23 | 24 |
|
24 | | -class IoUringIncubatorTransportFactory implements TransportFactory<IOUringSocketChannel, IOUringEventLoopGroup> { |
| 25 | +class IoUringTransportFactory implements TransportFactory<IoUringSocketChannel, MultiThreadIoEventLoopGroup> { |
25 | 26 |
|
26 | 27 | static boolean isAvailable() { |
27 | 28 | try { |
28 | | - Class.forName("io.netty.incubator.channel.uring.IOUring"); |
| 29 | + Class.forName("io.netty.channel.uring.IoUring"); |
29 | 30 | } catch (ClassNotFoundException e) { |
30 | 31 | return false; |
31 | 32 | } |
32 | | - return IOUring.isAvailable(); |
| 33 | + return IoUring.isAvailable(); |
33 | 34 | } |
34 | 35 |
|
35 | 36 | @Override |
36 | | - public IOUringSocketChannel newChannel() { |
37 | | - return new IOUringSocketChannel(); |
| 37 | + public IoUringSocketChannel newChannel() { |
| 38 | + return new IoUringSocketChannel(); |
38 | 39 | } |
39 | 40 |
|
40 | 41 | @Override |
41 | | - public IOUringEventLoopGroup newEventLoopGroup(int ioThreadsCount, ThreadFactory threadFactory) { |
42 | | - return new IOUringEventLoopGroup(ioThreadsCount, threadFactory); |
| 42 | + public MultiThreadIoEventLoopGroup newEventLoopGroup(int ioThreadsCount, ThreadFactory threadFactory) { |
| 43 | + return new MultiThreadIoEventLoopGroup(ioThreadsCount, threadFactory, IoUringIoHandler.newFactory()); |
43 | 44 | } |
44 | 45 | } |
0 commit comments