Home / Class/ TestsuitePermutation Class — netty Architecture

TestsuitePermutation Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  00b9cf8d_ddd6_796f_f38d_a03c9c52dc20["TestsuitePermutation"]
  93b4fafe_941a_664b_cffe_6f96503ebaf5["TestsuitePermutation.java"]
  00b9cf8d_ddd6_796f_f38d_a03c9c52dc20 -->|defined in| 93b4fafe_941a_664b_cffe_6f96503ebaf5
  d8d2be28_73cf_0a75_7d40_bb954f406433["allocator()"]
  00b9cf8d_ddd6_796f_f38d_a03c9c52dc20 -->|method| d8d2be28_73cf_0a75_7d40_bb954f406433
  a8a888f1_8564_7423_20f6_45739a1a9c10["TestsuitePermutation()"]
  00b9cf8d_ddd6_796f_f38d_a03c9c52dc20 -->|method| a8a888f1_8564_7423_20f6_45739a1a9c10
  20f36e0a_7ed9_cead_bc92_73544e06f036["ByteBuf()"]
  00b9cf8d_ddd6_796f_f38d_a03c9c52dc20 -->|method| 20f36e0a_7ed9_cead_bc92_73544e06f036

Relationship Graph

Source Code

testsuite/src/main/java/io/netty/testsuite/transport/TestsuitePermutation.java lines 30–58

public final class TestsuitePermutation {
    private static final AdaptiveByteBufAllocator DEFAULT_ADAPTIVE_ALLOCATOR = new AdaptiveByteBufAllocator();

    public static List<ByteBufAllocator> allocator() {
        List<ByteBufAllocator> allocators = new ArrayList<ByteBufAllocator>();
        allocators.add(UnpooledByteBufAllocator.DEFAULT);
        allocators.add(PooledByteBufAllocator.DEFAULT);
        allocators.add(DEFAULT_ADAPTIVE_ALLOCATOR);
        return allocators;
    }

    private TestsuitePermutation() { }

    public interface BootstrapFactory<CB extends AbstractBootstrap<?, ?>> {
        CB newInstance();
    }

    public interface BootstrapComboFactory<SB extends AbstractBootstrap<?, ?>, CB extends AbstractBootstrap<?, ?>> {
        SB newServerInstance();
        CB newClientInstance();
    }

    public static ByteBuf randomBufferType(ByteBufAllocator allocator, byte[] data, int offset, int length) {
        if (ThreadLocalRandom.current().nextBoolean()) {
            return allocator.directBuffer().writeBytes(data, offset, length);
        }
        return Unpooled.wrappedBuffer(data, offset, length);
    }
}

Frequently Asked Questions

What is the TestsuitePermutation class?
TestsuitePermutation is a class in the netty codebase, defined in testsuite/src/main/java/io/netty/testsuite/transport/TestsuitePermutation.java.
Where is TestsuitePermutation defined?
TestsuitePermutation is defined in testsuite/src/main/java/io/netty/testsuite/transport/TestsuitePermutation.java at line 30.

Analyze Your Own Codebase

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

Try Supermodel Free