IoUringIoHandlerTest Class — netty Architecture
Architecture documentation for the IoUringIoHandlerTest class in IoUringIoHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a5c22e87_b6d0_cf88_f1c4_d3668b78fb7d["IoUringIoHandlerTest"] 03d2df25_53fc_abc8_45d0_cfdee936a3c7["IoUringIoHandlerTest.java"] a5c22e87_b6d0_cf88_f1c4_d3668b78fb7d -->|defined in| 03d2df25_53fc_abc8_45d0_cfdee936a3c7 6a201a60_c408_33fd_b7b8_961c0046f96f["loadJNI()"] a5c22e87_b6d0_cf88_f1c4_d3668b78fb7d -->|method| 6a201a60_c408_33fd_b7b8_961c0046f96f b756075c_219c_bc48_58e8_5aaf6f5d2bd5["testOptions()"] a5c22e87_b6d0_cf88_f1c4_d3668b78fb7d -->|method| b756075c_219c_bc48_58e8_5aaf6f5d2bd5 e38057e4_203a_dc39_3fd0_72872c61c302["testSkipNotSupported()"] a5c22e87_b6d0_cf88_f1c4_d3668b78fb7d -->|method| e38057e4_203a_dc39_3fd0_72872c61c302 a072b9b6_1bb5_3ff4_f8db_b45bbf2f373d["testSetCqSizeOptions()"] a5c22e87_b6d0_cf88_f1c4_d3668b78fb7d -->|method| a072b9b6_1bb5_3ff4_f8db_b45bbf2f373d 0d776802_6f1e_94c6_a1e8_7e313205fc79["testSubmitAfterDestroy()"] a5c22e87_b6d0_cf88_f1c4_d3668b78fb7d -->|method| 0d776802_6f1e_94c6_a1e8_7e313205fc79 2dbbe39c_e401_b1f4_a9d0_8de9958fcbfc["setUpCQSizeUnavailable()"] a5c22e87_b6d0_cf88_f1c4_d3668b78fb7d -->|method| 2dbbe39c_e401_b1f4_a9d0_8de9958fcbfc
Relationship Graph
Source Code
transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringIoHandlerTest.java lines 34–164
public class IoUringIoHandlerTest {
@BeforeAll
public static void loadJNI() {
assumeTrue(IoUring.isAvailable());
}
@Test
public void testOptions() {
IoUringIoHandlerConfig config = new IoUringIoHandlerConfig();
config.setMaxBoundedWorker(2)
.setMaxUnboundedWorker(2)
.setRingSize(4);
IoHandlerFactory ioHandlerFactory = IoUringIoHandler.newFactory(config);
IoHandler handler = ioHandlerFactory.newHandler(new ThreadAwareExecutor() {
@Override
public boolean isExecutorThread(Thread thread) {
return false;
}
@Override
public void execute(Runnable command) {
command.run();
}
});
handler.initialize();
handler.prepareToDestroy();
handler.destroy();
}
@Test
public void testSkipNotSupported() throws Exception {
IoHandlerFactory ioHandlerFactory = IoUringIoHandler.newFactory();
IoHandler handler = ioHandlerFactory.newHandler(new ThreadAwareExecutor() {
@Override
public boolean isExecutorThread(Thread thread) {
return true;
}
@Override
public void execute(Runnable command) {
command.run();
}
});
handler.initialize();
IoRegistration registration = handler.register(new IoUringIoHandle() {
@Override
public void handle(IoRegistration registration, IoEvent ioEvent) {
fail();
}
@Override
public void close() {
// Noop
}
});
assertThrows(IllegalArgumentException.class, () ->
registration.submit(new IoUringIoOps(Native.IORING_OP_NOP, (byte) Native.IOSQE_CQE_SKIP_SUCCESS,
(short) 0, -1, 0, 0, 0, 0, (short) 0, (short) 0, (short) 0, 0, 0)));
assertTrue(registration.cancel());
assertFalse(registration.isValid());
handler.prepareToDestroy();
handler.destroy();
}
@Test
@DisabledIf("setUpCQSizeUnavailable")
public void testSetCqSizeOptions() {
IoUringIoHandlerConfig config = new IoUringIoHandlerConfig();
config.setMaxBoundedWorker(2)
.setMaxUnboundedWorker(2)
.setRingSize(4)
.setCqSize(32);
IoHandlerFactory ioHandlerFactory = IoUringIoHandler.newFactory(config);
IoHandler handler = ioHandlerFactory.newHandler(new ThreadAwareExecutor() {
@Override
public boolean isExecutorThread(Thread thread) {
return false;
Source
Frequently Asked Questions
What is the IoUringIoHandlerTest class?
IoUringIoHandlerTest is a class in the netty codebase, defined in transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringIoHandlerTest.java.
Where is IoUringIoHandlerTest defined?
IoUringIoHandlerTest is defined in transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringIoHandlerTest.java at line 34.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free