Home / Function/ testGatheringWritesPartial() — netty Function Reference

testGatheringWritesPartial() — netty Function Reference

Architecture documentation for the testGatheringWritesPartial() function in AbstractCompositeByteBufTest.java from the netty codebase.

Function java Buffer Telemetry called by 12

Entity Profile

Dependency Diagram

graph TD
  6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27["testGatheringWritesPartial()"]
  47bc0a20_e243_89ff_132b_99ac6b23835f["AbstractCompositeByteBufTest"]
  6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27 -->|defined in| 47bc0a20_e243_89ff_132b_99ac6b23835f
  8a7492f7_8486_a6a9_e2dd_5a860935b056["testGatheringWritesPartialHeap()"]
  8a7492f7_8486_a6a9_e2dd_5a860935b056 -->|calls| 6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27
  ac25e3b1_0609_6852_363b_65f4844aacad["testGatheringWritesPartialDirect()"]
  ac25e3b1_0609_6852_363b_65f4844aacad -->|calls| 6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27
  80d7d36f_571e_2774_2e2b_257d61eafb41["testGatheringWritesPartialMixes()"]
  80d7d36f_571e_2774_2e2b_257d61eafb41 -->|calls| 6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27
  52e8b92e_76ab_9d7e_f8c9_d438b8c1a0a6["testGatheringWritesPartialHeapSlice()"]
  52e8b92e_76ab_9d7e_f8c9_d438b8c1a0a6 -->|calls| 6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27
  c341cdca_ba42_78e1_84d5_493ec5726b14["testGatheringWritesPartialDirectSlice()"]
  c341cdca_ba42_78e1_84d5_493ec5726b14 -->|calls| 6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27
  a187ced9_01e4_f520_a57f_8e05e34e485e["testGatheringWritesPartialMixesSlice()"]
  a187ced9_01e4_f520_a57f_8e05e34e485e -->|calls| 6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27
  4d3df728_9ea0_2217_aa70_90f91a956600["testGatheringWritesPartialHeapPooled()"]
  4d3df728_9ea0_2217_aa70_90f91a956600 -->|calls| 6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27
  bb627284_bb89_5f30_d549_a4bb632be7dc["testGatheringWritesPartialDirectPooled()"]
  bb627284_bb89_5f30_d549_a4bb632be7dc -->|calls| 6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27
  525deb47_7e1a_7966_9b0a_990915a04500["testGatheringWritesPartialMixesPooled()"]
  525deb47_7e1a_7966_9b0a_990915a04500 -->|calls| 6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27
  ae96ccf3_b16c_ff62_920e_fb71bf4ab609["testGatheringWritesPartialHeapPooledSliced()"]
  ae96ccf3_b16c_ff62_920e_fb71bf4ab609 -->|calls| 6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27
  f26aea2e_6554_cf1d_06a1_ea0d17d3270c["testGatheringWritesPartialDirectPooledSliced()"]
  f26aea2e_6554_cf1d_06a1_ea0d17d3270c -->|calls| 6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27
  b8834f35_3e4c_ca94_e6aa_cb5455bb06ce["testGatheringWritesPartialMixesPooledSliced()"]
  b8834f35_3e4c_ca94_e6aa_cb5455bb06ce -->|calls| 6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27
  style 6f9a9242_ca3b_1820_7f3d_1a80eb4b9a27 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/AbstractCompositeByteBufTest.java lines 941–974

    private static void testGatheringWritesPartial(ByteBuf buf1, ByteBuf buf2, boolean slice) throws Exception {
        CompositeByteBuf buf = compositeBuffer();
        buf1.writeBytes(new byte[]{1, 2, 3, 4});
        buf2.writeBytes(new byte[]{1, 2, 3, 4});
        if (slice) {
            buf1 = buf1.readerIndex(1).slice();
            buf2 = buf2.writerIndex(3).slice();
            buf.addComponent(buf1);
            buf.addComponent(buf2);
            buf.writerIndex(6);
        } else {
            buf.addComponent(buf1);
            buf.addComponent(buf2);
            buf.writerIndex(7);
            buf.readerIndex(1);
        }

        TestGatheringByteChannel channel = new TestGatheringByteChannel(1);

        while (buf.isReadable()) {
            buf.readBytes(channel, buf.readableBytes());
        }

        byte[] data = new byte[6];

        if (slice) {
            buf.getBytes(0, data);
        } else {
            buf.getBytes(1, data);
        }
        assertArrayEquals(data, channel.writtenBytes());

        buf.release();
    }

Domain

Subdomains

Frequently Asked Questions

What does testGatheringWritesPartial() do?
testGatheringWritesPartial() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/AbstractCompositeByteBufTest.java.
Where is testGatheringWritesPartial() defined?
testGatheringWritesPartial() is defined in buffer/src/test/java/io/netty/buffer/AbstractCompositeByteBufTest.java at line 941.
What calls testGatheringWritesPartial()?
testGatheringWritesPartial() is called by 12 function(s): testGatheringWritesPartialDirect, testGatheringWritesPartialDirectPooled, testGatheringWritesPartialDirectPooledSliced, testGatheringWritesPartialDirectSlice, testGatheringWritesPartialHeap, testGatheringWritesPartialHeapPooled, testGatheringWritesPartialHeapPooledSliced, testGatheringWritesPartialHeapSlice, and 4 more.

Analyze Your Own Codebase

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

Try Supermodel Free