KQueueSocketTestPermutation Class — netty Architecture
Architecture documentation for the KQueueSocketTestPermutation class in KQueueSocketTestPermutation.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 8df74157_ee6b_4bb5_84ec_4d5083b86dfc["KQueueSocketTestPermutation"] da544278_3dac_4e02_7357_0fc104964648["KQueueSocketTestPermutation.java"] 8df74157_ee6b_4bb5_84ec_4d5083b86dfc -->|defined in| da544278_3dac_4e02_7357_0fc104964648 6128ec9f_f8b4_a1b0_abb5_9bf227955a7f["socket()"] 8df74157_ee6b_4bb5_84ec_4d5083b86dfc -->|method| 6128ec9f_f8b4_a1b0_abb5_9bf227955a7f 60a13eed_a596_80a9_3420_6fb5b8f785f1["serverSocket()"] 8df74157_ee6b_4bb5_84ec_4d5083b86dfc -->|method| 60a13eed_a596_80a9_3420_6fb5b8f785f1 050f1a65_b845_736f_b037_c48e2aa8e88a["clientSocket()"] 8df74157_ee6b_4bb5_84ec_4d5083b86dfc -->|method| 050f1a65_b845_736f_b037_c48e2aa8e88a 07c50211_39ff_f0ff_8cb3_048583441710["clientSocketWithFastOpen()"] 8df74157_ee6b_4bb5_84ec_4d5083b86dfc -->|method| 07c50211_39ff_f0ff_8cb3_048583441710 26bfaa11_c9e4_ff6d_4227_77fbf6eea8b6["datagram()"] 8df74157_ee6b_4bb5_84ec_4d5083b86dfc -->|method| 26bfaa11_c9e4_ff6d_4227_77fbf6eea8b6 c3fbaf56_32da_4e44_82f3_5608785b3a36["domainSocket()"] 8df74157_ee6b_4bb5_84ec_4d5083b86dfc -->|method| c3fbaf56_32da_4e44_82f3_5608785b3a36 595e5e06_3c82_22bd_d3b5_1d8526989ce2["serverDomainSocket()"] 8df74157_ee6b_4bb5_84ec_4d5083b86dfc -->|method| 595e5e06_3c82_22bd_d3b5_1d8526989ce2 d52dd72b_3cdb_7c94_ea9b_b2be9f253c2e["clientDomainSocket()"] 8df74157_ee6b_4bb5_84ec_4d5083b86dfc -->|method| d52dd72b_3cdb_7c94_ea9b_b2be9f253c2e e0530970_a35d_7728_de6f_167c54e6f53d["datagramSocket()"] 8df74157_ee6b_4bb5_84ec_4d5083b86dfc -->|method| e0530970_a35d_7728_de6f_167c54e6f53d 32042025_5fde_5bb6_1a97_bbdf92fca49b["domainDatagram()"] 8df74157_ee6b_4bb5_84ec_4d5083b86dfc -->|method| 32042025_5fde_5bb6_1a97_bbdf92fca49b a15fe7fe_fdaf_5e28_e12f_85c3019d4ea4["domainDatagramSocket()"] 8df74157_ee6b_4bb5_84ec_4d5083b86dfc -->|method| a15fe7fe_fdaf_5e28_e12f_85c3019d4ea4 a22ceac1_082f_7caa_8860_ea3534558faa["DomainSocketAddress()"] 8df74157_ee6b_4bb5_84ec_4d5083b86dfc -->|method| a22ceac1_082f_7caa_8860_ea3534558faa
Relationship Graph
Source Code
transport-native-kqueue/src/test/java/io/netty/channel/kqueue/KQueueSocketTestPermutation.java lines 41–230
class KQueueSocketTestPermutation extends SocketTestPermutation {
static final KQueueSocketTestPermutation INSTANCE = new KQueueSocketTestPermutation();
static final EventLoopGroup KQUEUE_GROUP = new MultiThreadIoEventLoopGroup(
NUM_THREADS, new DefaultThreadFactory("testsuite-KQueue-group", true), KQueueIoHandler.newFactory());
@Override
public List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> socket() {
List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> list =
combo(serverSocket(), clientSocketWithFastOpen());
list.remove(list.size() - 1); // Exclude NIO x NIO test
return list;
}
@Override
public List<BootstrapFactory<ServerBootstrap>> serverSocket() {
List<BootstrapFactory<ServerBootstrap>> toReturn = new ArrayList<BootstrapFactory<ServerBootstrap>>();
toReturn.add(new BootstrapFactory<ServerBootstrap>() {
@Override
public ServerBootstrap newInstance() {
return new ServerBootstrap().group(KQUEUE_GROUP)
.channel(KQueueServerSocketChannel.class);
}
});
if (KQueue.isTcpFastOpenServerSideAvailable()) {
toReturn.add(new BootstrapFactory<ServerBootstrap>() {
@Override
public ServerBootstrap newInstance() {
ServerBootstrap serverBootstrap = new ServerBootstrap()
.group(KQUEUE_GROUP)
.channel(KQueueServerSocketChannel.class);
serverBootstrap.option(ChannelOption.TCP_FASTOPEN, 1);
return serverBootstrap;
}
});
}
toReturn.add(new BootstrapFactory<ServerBootstrap>() {
@Override
public ServerBootstrap newInstance() {
return new ServerBootstrap().group(NIO_GROUP)
.channel(NioServerSocketChannel.class);
}
});
return toReturn;
}
@Override
public List<BootstrapFactory<Bootstrap>> clientSocket() {
List<BootstrapFactory<Bootstrap>> toReturn = new ArrayList<BootstrapFactory<Bootstrap>>();
toReturn.add(new BootstrapFactory<Bootstrap>() {
@Override
public Bootstrap newInstance() {
return new Bootstrap().group(KQUEUE_GROUP).channel(KQueueSocketChannel.class);
}
});
toReturn.add(new BootstrapFactory<Bootstrap>() {
@Override
public Bootstrap newInstance() {
return new Bootstrap().group(NIO_GROUP).channel(NioSocketChannel.class);
}
});
return toReturn;
}
@Override
public List<BootstrapFactory<Bootstrap>> clientSocketWithFastOpen() {
List<BootstrapFactory<Bootstrap>> factories = clientSocket();
if (KQueue.isTcpFastOpenClientSideAvailable()) {
int insertIndex = factories.size() - 1; // Keep NIO fixture last.
factories.add(insertIndex, new BootstrapFactory<Bootstrap>() {
@Override
Defined In
Source
Frequently Asked Questions
What is the KQueueSocketTestPermutation class?
KQueueSocketTestPermutation is a class in the netty codebase, defined in transport-native-kqueue/src/test/java/io/netty/channel/kqueue/KQueueSocketTestPermutation.java.
Where is KQueueSocketTestPermutation defined?
KQueueSocketTestPermutation is defined in transport-native-kqueue/src/test/java/io/netty/channel/kqueue/KQueueSocketTestPermutation.java at line 41.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free