Home / Class/ EpollSocketTestPermutation Class — netty Architecture

EpollSocketTestPermutation Class — netty Architecture

Architecture documentation for the EpollSocketTestPermutation class in EpollSocketTestPermutation.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b["EpollSocketTestPermutation"]
  0989d412_8ef5_0b1f_6a4d_34172a698e81["EpollSocketTestPermutation.java"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|defined in| 0989d412_8ef5_0b1f_6a4d_34172a698e81
  335abf57_1f78_b084_42ff_cd6927a6ed50["socket()"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|method| 335abf57_1f78_b084_42ff_cd6927a6ed50
  8171cf8b_ad3e_bc87_d330_94a645c86641["socketWithoutFastOpen()"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|method| 8171cf8b_ad3e_bc87_d330_94a645c86641
  47c6d0f4_b1a7_fe4b_72a6_5367947357c9["serverSocket()"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|method| 47c6d0f4_b1a7_fe4b_72a6_5367947357c9
  526ee6ce_d0a5_a7a0_3443_4820e7b83107["clientSocket()"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|method| 526ee6ce_d0a5_a7a0_3443_4820e7b83107
  847d5e04_f3f3_6693_5b55_7be952eb485e["clientSocketWithFastOpen()"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|method| 847d5e04_f3f3_6693_5b55_7be952eb485e
  edca7dd0_daad_7f3e_9ca0_71edd252bb3c["datagram()"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|method| edca7dd0_daad_7f3e_9ca0_71edd252bb3c
  63b9077d_b957_e5d8_3c59_0b0913937316["epollOnlyDatagram()"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|method| 63b9077d_b957_e5d8_3c59_0b0913937316
  c144ba6d_a09d_c9b8_8b03_7c15f3a12aa6["datagramBootstrapFactory()"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|method| c144ba6d_a09d_c9b8_8b03_7c15f3a12aa6
  5da5b66c_a6eb_3e45_d6c6_36d0a28d5415["domainSocket()"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|method| 5da5b66c_a6eb_3e45_d6c6_36d0a28d5415
  932c82b1_c285_251f_f315_a04e7c5face6["serverDomainSocket()"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|method| 932c82b1_c285_251f_f315_a04e7c5face6
  11c66c4f_ca46_0ae0_8c83_02652a571e56["clientDomainSocket()"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|method| 11c66c4f_ca46_0ae0_8c83_02652a571e56
  e009fb90_522c_baef_3521_9ba7d908040e["datagramSocket()"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|method| e009fb90_522c_baef_3521_9ba7d908040e
  98d3e212_1920_9f4e_0608_fce4dae27d34["domainDatagram()"]
  2104f5df_e24e_3ceb_8b6a_7d1927ef598b -->|method| 98d3e212_1920_9f4e_0608_fce4dae27d34

Relationship Graph

Source Code

transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollSocketTestPermutation.java lines 42–262

class EpollSocketTestPermutation extends SocketTestPermutation {

    static final EpollSocketTestPermutation INSTANCE = new EpollSocketTestPermutation();

    static final EventLoopGroup EPOLL_GROUP = new MultiThreadIoEventLoopGroup(
            NUM_THREADS, new DefaultThreadFactory("testsuite-epoll", true), EpollIoHandler.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;
    }

    public List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> socketWithoutFastOpen() {
        List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> list =
                combo(serverSocket(), clientSocket());

        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(EPOLL_GROUP)
                                            .channel(EpollServerSocketChannel.class);
            }
        });
        if (Epoll.isTcpFastOpenServerSideAvailable()) {
            toReturn.add(new BootstrapFactory<ServerBootstrap>() {
                @Override
                public ServerBootstrap newInstance() {
                    ServerBootstrap serverBootstrap = new ServerBootstrap().group(EPOLL_GROUP)
                                                                           .channel(EpollServerSocketChannel.class);
                    serverBootstrap.option(ChannelOption.TCP_FASTOPEN, 5);
                    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(EPOLL_GROUP).channel(EpollSocketChannel.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() {

Frequently Asked Questions

What is the EpollSocketTestPermutation class?
EpollSocketTestPermutation is a class in the netty codebase, defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollSocketTestPermutation.java.
Where is EpollSocketTestPermutation defined?
EpollSocketTestPermutation is defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollSocketTestPermutation.java at line 42.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free