PreferHeapByteBufAllocator Class — netty Architecture
Architecture documentation for the PreferHeapByteBufAllocator class in PreferHeapByteBufAllocator.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d2838097_8065_587c_9c7a_120a5cefb5c3["PreferHeapByteBufAllocator"] af393303_b31a_409e_f86b_19a096dd61a8["PreferHeapByteBufAllocator.java"] d2838097_8065_587c_9c7a_120a5cefb5c3 -->|defined in| af393303_b31a_409e_f86b_19a096dd61a8 a30aac9e_3d47_2f24_16a9_420b35ba9a82["PreferHeapByteBufAllocator()"] d2838097_8065_587c_9c7a_120a5cefb5c3 -->|method| a30aac9e_3d47_2f24_16a9_420b35ba9a82 d0e2cde6_3db8_7190_bad3_224e035d2172["ByteBuf()"] d2838097_8065_587c_9c7a_120a5cefb5c3 -->|method| d0e2cde6_3db8_7190_bad3_224e035d2172 66786e0d_919a_92fc_b6b9_3564b96d3714["CompositeByteBuf()"] d2838097_8065_587c_9c7a_120a5cefb5c3 -->|method| 66786e0d_919a_92fc_b6b9_3564b96d3714 cc6ef0d7_a755_6a86_cefd_007e2b2e654c["isDirectBufferPooled()"] d2838097_8065_587c_9c7a_120a5cefb5c3 -->|method| cc6ef0d7_a755_6a86_cefd_007e2b2e654c 4405b2b3_d0ca_e199_dcb1_ab9101ffc270["calculateNewCapacity()"] d2838097_8065_587c_9c7a_120a5cefb5c3 -->|method| 4405b2b3_d0ca_e199_dcb1_ab9101ffc270
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/PreferHeapByteBufAllocator.java lines 28–135
@UnstableApi
public final class PreferHeapByteBufAllocator implements ByteBufAllocator {
private final ByteBufAllocator allocator;
public PreferHeapByteBufAllocator(ByteBufAllocator allocator) {
this.allocator = ObjectUtil.checkNotNull(allocator, "allocator");
}
@Override
public ByteBuf buffer() {
return allocator.heapBuffer();
}
@Override
public ByteBuf buffer(int initialCapacity) {
return allocator.heapBuffer(initialCapacity);
}
@Override
public ByteBuf buffer(int initialCapacity, int maxCapacity) {
return allocator.heapBuffer(initialCapacity, maxCapacity);
}
@Override
public ByteBuf ioBuffer() {
return allocator.heapBuffer();
}
@Override
public ByteBuf ioBuffer(int initialCapacity) {
return allocator.heapBuffer(initialCapacity);
}
@Override
public ByteBuf ioBuffer(int initialCapacity, int maxCapacity) {
return allocator.heapBuffer(initialCapacity, maxCapacity);
}
@Override
public ByteBuf heapBuffer() {
return allocator.heapBuffer();
}
@Override
public ByteBuf heapBuffer(int initialCapacity) {
return allocator.heapBuffer(initialCapacity);
}
@Override
public ByteBuf heapBuffer(int initialCapacity, int maxCapacity) {
return allocator.heapBuffer(initialCapacity, maxCapacity);
}
@Override
public ByteBuf directBuffer() {
return allocator.directBuffer();
}
@Override
public ByteBuf directBuffer(int initialCapacity) {
return allocator.directBuffer(initialCapacity);
}
@Override
public ByteBuf directBuffer(int initialCapacity, int maxCapacity) {
return allocator.directBuffer(initialCapacity, maxCapacity);
}
@Override
public CompositeByteBuf compositeBuffer() {
return allocator.compositeHeapBuffer();
}
@Override
public CompositeByteBuf compositeBuffer(int maxNumComponents) {
return allocator.compositeHeapBuffer(maxNumComponents);
}
@Override
public CompositeByteBuf compositeHeapBuffer() {
return allocator.compositeHeapBuffer();
Source
Frequently Asked Questions
What is the PreferHeapByteBufAllocator class?
PreferHeapByteBufAllocator is a class in the netty codebase, defined in transport/src/main/java/io/netty/channel/PreferHeapByteBufAllocator.java.
Where is PreferHeapByteBufAllocator defined?
PreferHeapByteBufAllocator is defined in transport/src/main/java/io/netty/channel/PreferHeapByteBufAllocator.java at line 28.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free