Home / Class/ EpollSocketStringEchoBusyWaitTest Class — netty Architecture

EpollSocketStringEchoBusyWaitTest Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  cec5ab39_3b45_79d9_36d1_e0de33b63ea7["EpollSocketStringEchoBusyWaitTest"]
  c122d941_8607_a053_5d83_98853dd78dc7["EpollSocketStringEchoBusyWaitTest.java"]
  cec5ab39_3b45_79d9_36d1_e0de33b63ea7 -->|defined in| c122d941_8607_a053_5d83_98853dd78dc7
  43b7087e_4422_cf60_6a3e_fd0b98d9770a["setup()"]
  cec5ab39_3b45_79d9_36d1_e0de33b63ea7 -->|method| 43b7087e_4422_cf60_6a3e_fd0b98d9770a
  f5f4314b_f1aa_efad_a176_80b1c4703e5d["teardown()"]
  cec5ab39_3b45_79d9_36d1_e0de33b63ea7 -->|method| f5f4314b_f1aa_efad_a176_80b1c4703e5d
  d71a34a1_533f_8a84_c4f2_528af3de6d45["newFactories()"]
  cec5ab39_3b45_79d9_36d1_e0de33b63ea7 -->|method| d71a34a1_533f_8a84_c4f2_528af3de6d45
  493c3a1e_25b5_33a7_58cb_19c8f3fbdc15["serverSocket()"]
  cec5ab39_3b45_79d9_36d1_e0de33b63ea7 -->|method| 493c3a1e_25b5_33a7_58cb_19c8f3fbdc15
  c3eb0bd3_7c34_b365_c681_dab4a2d29da2["clientSocket()"]
  cec5ab39_3b45_79d9_36d1_e0de33b63ea7 -->|method| c3eb0bd3_7c34_b365_c681_dab4a2d29da2

Relationship Graph

Source Code

transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollSocketStringEchoBusyWaitTest.java lines 36–101

public class EpollSocketStringEchoBusyWaitTest extends SocketStringEchoTest {

    private static EventLoopGroup EPOLL_LOOP;

    @BeforeAll
    public static void setup() throws Exception {
        EPOLL_LOOP = new MultiThreadIoEventLoopGroup(2, new DefaultThreadFactory("testsuite-epoll-busy-wait", true),
                EpollIoHandler.newFactory(1024, new SelectStrategyFactory() {
                    @Override
                    public SelectStrategy newSelectStrategy() {
                        return new SelectStrategy() {
                            @Override
                            public int calculateStrategy(IntSupplier selectSupplier, boolean hasTasks) {
                                return SelectStrategy.BUSY_WAIT;
                            }
                        };
                    }
                }));
    }

    @AfterAll
    public static void teardown() throws Exception {
        if (EPOLL_LOOP != null) {
            EPOLL_LOOP.shutdownGracefully();
        }
    }

    @Override
    protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
        List<BootstrapComboFactory<ServerBootstrap, Bootstrap>> list =
                new ArrayList<BootstrapComboFactory<ServerBootstrap, Bootstrap>>();
        final BootstrapFactory<ServerBootstrap> sbf = serverSocket();
        final BootstrapFactory<Bootstrap> cbf = clientSocket();
        list.add(new BootstrapComboFactory<ServerBootstrap, Bootstrap>() {
            @Override
            public ServerBootstrap newServerInstance() {
                return sbf.newInstance();
            }

            @Override
            public Bootstrap newClientInstance() {
                return cbf.newInstance();
            }
        });

        return list;
    }

    private static BootstrapFactory<ServerBootstrap> serverSocket() {
        return new BootstrapFactory<ServerBootstrap>() {
            @Override
            public ServerBootstrap newInstance() {
                return new ServerBootstrap().group(EPOLL_LOOP).channel(EpollServerSocketChannel.class);
            }
        };
    }

    private static BootstrapFactory<Bootstrap> clientSocket() {
        return new BootstrapFactory<Bootstrap>() {
            @Override
            public Bootstrap newInstance() {
                return new Bootstrap().group(EPOLL_LOOP).channel(EpollSocketChannel.class);
            }
        };
    }
}

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free