Home / Class/ PooledDuplicatedByteBuf Class — netty Architecture

PooledDuplicatedByteBuf Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  56c9df0a_8736_fff6_1b71_65b3b16809a3["PooledDuplicatedByteBuf"]
  43de530b_6f33_4672_797d_f6faad1a4e96["PooledDuplicatedByteBuf.java"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|defined in| 43de530b_6f33_4672_797d_f6faad1a4e96
  a446b0a9_0e89_2453_8cd5_b53c885461b8["PooledDuplicatedByteBuf()"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|method| a446b0a9_0e89_2453_8cd5_b53c885461b8
  13608310_c504_9c56_b1c9_16f5383b2a6a["capacity()"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|method| 13608310_c504_9c56_b1c9_16f5383b2a6a
  c47bbd05_ef77_8415_6df0_3c8a7c331372["ByteBuf()"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|method| c47bbd05_ef77_8415_6df0_3c8a7c331372
  e3a71ccf_682e_2fce_af34_e7140ba30d40["arrayOffset()"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|method| e3a71ccf_682e_2fce_af34_e7140ba30d40
  9b8f90a6_ada6_2f53_8c97_9ecf836c97f9["memoryAddress()"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|method| 9b8f90a6_ada6_2f53_8c97_9ecf836c97f9
  9f7c83c3_c9a0_47ea_9f60_4f0267e72b1d["ByteBuffer()"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|method| 9f7c83c3_c9a0_47ea_9f60_4f0267e72b1d
  ade29e7a_ead9_ccbf_89ba_63fd25e3a317["nioBuffers()"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|method| ade29e7a_ead9_ccbf_89ba_63fd25e3a317
  2ba35ab0_c249_069a_72e9_5dc9b644ebef["getByte()"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|method| 2ba35ab0_c249_069a_72e9_5dc9b644ebef
  f37d5d14_6b05_7c1e_e878_005ce91b1298["_getByte()"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|method| f37d5d14_6b05_7c1e_e878_005ce91b1298
  5cb676bb_ceab_b05a_4bfd_a3cf655da85b["getShort()"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|method| 5cb676bb_ceab_b05a_4bfd_a3cf655da85b
  200c64d4_a26d_1d05_a7b4_8beb55ae614d["_getShort()"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|method| 200c64d4_a26d_1d05_a7b4_8beb55ae614d
  e74032e6_c09a_fe84_5e67_46b2f5ce85aa["getShortLE()"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|method| e74032e6_c09a_fe84_5e67_46b2f5ce85aa
  0899edd4_8212_8f8e_89f2_e0be7ace8736["_getShortLE()"]
  56c9df0a_8736_fff6_1b71_65b3b16809a3 -->|method| 0899edd4_8212_8f8e_89f2_e0be7ace8736

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/PooledDuplicatedByteBuf.java lines 31–377

final class PooledDuplicatedByteBuf extends AbstractPooledDerivedByteBuf {

    private static final Recycler<PooledDuplicatedByteBuf> RECYCLER =
            new Recycler<PooledDuplicatedByteBuf>() {
                @Override
                protected PooledDuplicatedByteBuf newObject(Handle<PooledDuplicatedByteBuf> handle) {
                    return new PooledDuplicatedByteBuf(handle);
                }
            };

    static PooledDuplicatedByteBuf newInstance(AbstractByteBuf unwrapped, ByteBuf wrapped,
                                               int readerIndex, int writerIndex) {
        final PooledDuplicatedByteBuf duplicate = RECYCLER.get();
        duplicate.init(unwrapped, wrapped, readerIndex, writerIndex, unwrapped.maxCapacity());
        duplicate.markReaderIndex();
        duplicate.markWriterIndex();

        return duplicate;
    }

    private PooledDuplicatedByteBuf(Handle<PooledDuplicatedByteBuf> handle) {
        super(handle);
    }

    @Override
    public int capacity() {
        return unwrap().capacity();
    }

    @Override
    public ByteBuf capacity(int newCapacity) {
        unwrap().capacity(newCapacity);
        return this;
    }

    @Override
    public int arrayOffset() {
        return unwrap().arrayOffset();
    }

    @Override
    public long memoryAddress() {
        return unwrap().memoryAddress();
    }

    @Override
    public ByteBuffer nioBuffer(int index, int length) {
        return unwrap().nioBuffer(index, length);
    }

    @Override
    public ByteBuffer[] nioBuffers(int index, int length) {
        return unwrap().nioBuffers(index, length);
    }

    @Override
    public ByteBuf copy(int index, int length) {
        return unwrap().copy(index, length);
    }

    @Override
    public ByteBuf retainedSlice(int index, int length) {
        return PooledSlicedByteBuf.newInstance(unwrap(), this, index, length);
    }

    @Override
    public ByteBuf duplicate() {
        return duplicate0().setIndex(readerIndex(), writerIndex());
    }

    @Override
    public ByteBuf retainedDuplicate() {
        return PooledDuplicatedByteBuf.newInstance(unwrap(), this, readerIndex(), writerIndex());
    }

    @Override
    public byte getByte(int index) {
        return unwrap().getByte(index);
    }

    @Override

Frequently Asked Questions

What is the PooledDuplicatedByteBuf class?
PooledDuplicatedByteBuf is a class in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/PooledDuplicatedByteBuf.java.
Where is PooledDuplicatedByteBuf defined?
PooledDuplicatedByteBuf is defined in buffer/src/main/java/io/netty/buffer/PooledDuplicatedByteBuf.java at line 31.

Analyze Your Own Codebase

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

Try Supermodel Free