public class HeapByteBufAllocator extends AbstractByteBufAllocator
directNioChunkAllocator, heapNioChunkAllocator, initialCapacityByDefault, sliceSizeByDefaultDEFAULT| 限定符 | 构造器和说明 |
|---|---|
protected |
HeapByteBufAllocator(int initialCapacityByDefault,
int sliceSizeByDefault)
Create new instance
|
| 限定符和类型 | 方法和说明 |
|---|---|
ByteBuf |
buffer(int initialCapacity,
int maxCapacity)
Allocate a
ByteBuf with the given initial capacity and the given maximal capacity. |
boolean |
isDirect()
Returns
true if pooled ByteBuf's |
boolean |
isPooled()
Returns
true if direct ByteBuf's |
ByteBuf |
pooledBuffer(int initialCapacity,
int maxCapacity,
int sliceSize)
Allocate a direct
ByteBuf with the given initial capacity and the given maximal capacity. |
arrayBuffer, arrayBuffer, arrayBuffer, buffer, buffer, directBuffer, directBuffer, directBuffer, heapBuffer, heapBuffer, heapBuffer, pooledBuffer, pooledBuffer, pooledDirectBuffer, pooledDirectBuffer, pooledDirectBuffer, pooledHeapBuffer, pooledHeapBuffer, pooledHeapBuffer, wrap, wrapprotected HeapByteBufAllocator(int initialCapacityByDefault,
int sliceSizeByDefault)
public boolean isPooled()
ByteBufAllocatortrue if direct ByteBuf'spublic boolean isDirect()
ByteBufAllocatortrue if pooled ByteBuf'spublic ByteBuf buffer(int initialCapacity, int maxCapacity)
ByteBufAllocatorByteBuf with the given initial capacity and the given maximal capacity.
If it is a direct or heap buffer depends on the actual implementation.public ByteBuf pooledBuffer(int initialCapacity, int maxCapacity, int sliceSize)
ByteBufAllocatorByteBuf with the given initial capacity and the given maximal capacity.
If it is a direct or heap buffer depends on the actual implementation.Copyright © 2022–2024. All rights reserved.