Home / Class/ InstrumentedUnpooledHeapByteBuf Class — netty Architecture

InstrumentedUnpooledHeapByteBuf Class — netty Architecture

Architecture documentation for the InstrumentedUnpooledHeapByteBuf class in UnpooledByteBufAllocator.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  2b7b6984_3343_6911_d364_6005a304ba48["InstrumentedUnpooledHeapByteBuf"]
  0b4b2671_fb24_9a0d_bc3a_aef00ae524b0["UnpooledByteBufAllocator.java"]
  2b7b6984_3343_6911_d364_6005a304ba48 -->|defined in| 0b4b2671_fb24_9a0d_bc3a_aef00ae524b0
  c3f26c40_d549_46d8_aaa0_e6c71d1156a9["InstrumentedUnpooledHeapByteBuf()"]
  2b7b6984_3343_6911_d364_6005a304ba48 -->|method| c3f26c40_d549_46d8_aaa0_e6c71d1156a9
  0a8eb85d_6ed9_1d4a_f4ce_a7b196f65500["allocateArray()"]
  2b7b6984_3343_6911_d364_6005a304ba48 -->|method| 0a8eb85d_6ed9_1d4a_f4ce_a7b196f65500
  73e8f787_0336_302b_8599_de04bcb682a7["freeArray()"]
  2b7b6984_3343_6911_d364_6005a304ba48 -->|method| 73e8f787_0336_302b_8599_de04bcb682a7

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/UnpooledByteBufAllocator.java lines 158–176

    private static final class InstrumentedUnpooledHeapByteBuf extends UnpooledHeapByteBuf {
        InstrumentedUnpooledHeapByteBuf(UnpooledByteBufAllocator alloc, int initialCapacity, int maxCapacity) {
            super(alloc, initialCapacity, maxCapacity);
        }

        @Override
        protected byte[] allocateArray(int initialCapacity) {
            byte[] bytes = super.allocateArray(initialCapacity);
            ((UnpooledByteBufAllocator) alloc()).incrementHeap(bytes.length);
            return bytes;
        }

        @Override
        protected void freeArray(byte[] array) {
            int length = array.length;
            super.freeArray(array);
            ((UnpooledByteBufAllocator) alloc()).decrementHeap(length);
        }
    }

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free