@UnstableApi public final class PreferHeapByteBufAllocator extends Object implements io.netty.buffer.ByteBufAllocator
ByteBufAllocator and use heapbuffers everywhere except when a direct buffer is explicit
requested.| Constructor and Description |
|---|
PreferHeapByteBufAllocator(io.netty.buffer.ByteBufAllocator allocator) |
| Modifier and Type | Method and Description |
|---|---|
io.netty.buffer.ByteBuf |
buffer() |
io.netty.buffer.ByteBuf |
buffer(int initialCapacity) |
io.netty.buffer.ByteBuf |
buffer(int initialCapacity,
int maxCapacity) |
int |
calculateNewCapacity(int minNewCapacity,
int maxCapacity) |
io.netty.buffer.CompositeByteBuf |
compositeBuffer() |
io.netty.buffer.CompositeByteBuf |
compositeBuffer(int maxNumComponents) |
io.netty.buffer.CompositeByteBuf |
compositeDirectBuffer() |
io.netty.buffer.CompositeByteBuf |
compositeDirectBuffer(int maxNumComponents) |
io.netty.buffer.CompositeByteBuf |
compositeHeapBuffer() |
io.netty.buffer.CompositeByteBuf |
compositeHeapBuffer(int maxNumComponents) |
io.netty.buffer.ByteBuf |
directBuffer() |
io.netty.buffer.ByteBuf |
directBuffer(int initialCapacity) |
io.netty.buffer.ByteBuf |
directBuffer(int initialCapacity,
int maxCapacity) |
io.netty.buffer.ByteBuf |
heapBuffer() |
io.netty.buffer.ByteBuf |
heapBuffer(int initialCapacity) |
io.netty.buffer.ByteBuf |
heapBuffer(int initialCapacity,
int maxCapacity) |
io.netty.buffer.ByteBuf |
ioBuffer() |
io.netty.buffer.ByteBuf |
ioBuffer(int initialCapacity) |
io.netty.buffer.ByteBuf |
ioBuffer(int initialCapacity,
int maxCapacity) |
boolean |
isDirectBufferPooled() |
public PreferHeapByteBufAllocator(io.netty.buffer.ByteBufAllocator allocator)
public io.netty.buffer.ByteBuf buffer()
buffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf buffer(int initialCapacity)
buffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf buffer(int initialCapacity,
int maxCapacity)
buffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf ioBuffer()
ioBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf ioBuffer(int initialCapacity)
ioBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf ioBuffer(int initialCapacity,
int maxCapacity)
ioBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf heapBuffer()
heapBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf heapBuffer(int initialCapacity)
heapBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf heapBuffer(int initialCapacity,
int maxCapacity)
heapBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf directBuffer()
directBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf directBuffer(int initialCapacity)
directBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf directBuffer(int initialCapacity,
int maxCapacity)
directBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.CompositeByteBuf compositeBuffer()
compositeBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.CompositeByteBuf compositeBuffer(int maxNumComponents)
compositeBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.CompositeByteBuf compositeHeapBuffer()
compositeHeapBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.CompositeByteBuf compositeHeapBuffer(int maxNumComponents)
compositeHeapBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.CompositeByteBuf compositeDirectBuffer()
compositeDirectBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.CompositeByteBuf compositeDirectBuffer(int maxNumComponents)
compositeDirectBuffer in interface io.netty.buffer.ByteBufAllocatorpublic boolean isDirectBufferPooled()
isDirectBufferPooled in interface io.netty.buffer.ByteBufAllocatorpublic int calculateNewCapacity(int minNewCapacity,
int maxCapacity)
calculateNewCapacity in interface io.netty.buffer.ByteBufAllocatorCopyright © 2008–2025 The Netty Project. All rights reserved.