IoUringChannelConfigTest Class — netty Architecture
Architecture documentation for the IoUringChannelConfigTest class in IoUringChannelConfigTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d5a07f05_de7b_2513_eb07_6caa0049ae1e["IoUringChannelConfigTest"] 48914cbb_581f_0639_400b_c5633b05e32d["IoUringChannelConfigTest.java"] d5a07f05_de7b_2513_eb07_6caa0049ae1e -->|defined in| 48914cbb_581f_0639_400b_c5633b05e32d e7092947_043b_1868_a1e8_b97da0dbf3c6["loadJNI()"] d5a07f05_de7b_2513_eb07_6caa0049ae1e -->|method| e7092947_043b_1868_a1e8_b97da0dbf3c6 d7229643_4b9a_5da9_790e_aac1ade55c2e["testIntegerOption()"] d5a07f05_de7b_2513_eb07_6caa0049ae1e -->|method| d7229643_4b9a_5da9_790e_aac1ade55c2e bc77c788_e93d_589b_c2f4_00a0e1c429dd["testRawOption()"] d5a07f05_de7b_2513_eb07_6caa0049ae1e -->|method| bc77c788_e93d_589b_c2f4_00a0e1c429dd
Relationship Graph
Source Code
transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringChannelConfigTest.java lines 31–70
public class IoUringChannelConfigTest {
@BeforeAll
public static void loadJNI() {
assumeTrue(IoUring.isAvailable());
}
@Test
public void testIntegerOption() throws Exception {
IoUringSocketChannel channel = new IoUringSocketChannel();
IntegerUnixChannelOption opt = new IntegerUnixChannelOption("INT_OPT", 1, 2);
Integer zero = 0;
assertEquals(zero, channel.config().getOption(opt));
channel.config().setOption(opt, 1);
assertNotEquals(zero, channel.config().getOption(opt));
channel.fd().close();
}
@Test
public void testRawOption() throws Exception {
IoUringSocketChannel channel = new IoUringSocketChannel();
// Value for SOL_SOCKET and SO_REUSEADDR
// See https://github.com/torvalds/linux/blob/v5.17/include/uapi/asm-generic/socket.h
RawUnixChannelOption opt = new RawUnixChannelOption("RAW_OPT", 1, 2, 4);
CleanableDirectBuffer disabledCleanable = Buffer.allocateDirectBufferWithNativeOrder(4);
ByteBuffer disabled = disabledCleanable.buffer();
disabled.putInt(0).flip();
assertEquals(disabled, channel.config().getOption(opt));
CleanableDirectBuffer enabledCleanable = Buffer.allocateDirectBufferWithNativeOrder(4);
ByteBuffer enabled = enabledCleanable.buffer();
enabled.putInt(1).flip();
channel.config().setOption(opt, enabled);
assertNotEquals(disabled, channel.config().getOption(opt));
channel.fd().close();
disabledCleanable.clean();
enabledCleanable.clean();
}
}
Defined In
Source
Frequently Asked Questions
What is the IoUringChannelConfigTest class?
IoUringChannelConfigTest is a class in the netty codebase, defined in transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringChannelConfigTest.java.
Where is IoUringChannelConfigTest defined?
IoUringChannelConfigTest is defined in transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringChannelConfigTest.java at line 31.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free