Package org.apache.hadoop.hbase.ipc
Class HeapByteBufAllocator
java.lang.Object
org.apache.hbase.thirdparty.io.netty.buffer.AbstractByteBufAllocator
org.apache.hadoop.hbase.ipc.HeapByteBufAllocator
- All Implemented Interfaces:
org.apache.hbase.thirdparty.io.netty.buffer.ByteBufAllocator
@Private
public class HeapByteBufAllocator
extends org.apache.hbase.thirdparty.io.netty.buffer.AbstractByteBufAllocator
A pooled ByteBufAllocator that does not prefer direct buffers regardless of platform settings.
In some cases direct buffers are still required, like IO buffers where the buffer will be used in conjunction with a native method call, so we cannot force all buffer usage on heap. But we can strongly prefer it.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HeapByteBufAllocator
private final org.apache.hbase.thirdparty.io.netty.buffer.PooledByteBufAllocator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
protected org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf
newDirectBuffer
(int initialCapacity, int maxCapacity) protected org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf
newHeapBuffer
(int initialCapacity, int maxCapacity) Methods inherited from class org.apache.hbase.thirdparty.io.netty.buffer.AbstractByteBufAllocator
buffer, buffer, buffer, calculateNewCapacity, compositeBuffer, compositeBuffer, compositeDirectBuffer, compositeDirectBuffer, compositeHeapBuffer, compositeHeapBuffer, directBuffer, directBuffer, directBuffer, heapBuffer, heapBuffer, heapBuffer, ioBuffer, ioBuffer, ioBuffer, toLeakAwareBuffer, toLeakAwareBuffer, toString
-
Field Details
-
DEFAULT
-
delegate
-
-
Constructor Details
-
HeapByteBufAllocator
public HeapByteBufAllocator()
-
-
Method Details
-
isDirectBufferPooled
-
newHeapBuffer
protected org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf newHeapBuffer(int initialCapacity, int maxCapacity) - Specified by:
newHeapBuffer
in classorg.apache.hbase.thirdparty.io.netty.buffer.AbstractByteBufAllocator
-
newDirectBuffer
protected org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity) - Specified by:
newDirectBuffer
in classorg.apache.hbase.thirdparty.io.netty.buffer.AbstractByteBufAllocator
-