Package org.apache.cassandra.net
Class BufferPoolAllocator
java.lang.Object
io.netty.buffer.AbstractByteBufAllocator
org.apache.cassandra.net.BufferPoolAllocator
- All Implemented Interfaces:
io.netty.buffer.ByteBufAllocator
- Direct Known Subclasses:
GlobalBufferPoolAllocator
public abstract class BufferPoolAllocator
extends io.netty.buffer.AbstractByteBufAllocator
A trivial wrapper around BufferPool for integrating with Netty, but retaining ownership of pooling behaviour
that is integrated into Cassandra's other pooling.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA simple extension to UnpooledUnsafeDirectByteBuf that returns buffers to BufferPool on deallocate, and permits extracting the buffer from it to take ownership and use directly. -
Field Summary
Fields inherited from interface io.netty.buffer.ByteBufAllocator
DEFAULT -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected io.netty.buffer.ByteBufnewDirectBuffer(int minCapacity, int maxCapacity) protected io.netty.buffer.ByteBufnewHeapBuffer(int minCapacity, int maxCapacity) shouldn't be invokedlongMethods inherited from class 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
-
Method Details
-
isDirectBufferPooled
public boolean isDirectBufferPooled() -
newHeapBuffer
protected io.netty.buffer.ByteBuf newHeapBuffer(int minCapacity, int maxCapacity) shouldn't be invoked- Specified by:
newHeapBufferin classio.netty.buffer.AbstractByteBufAllocator
-
newDirectBuffer
protected io.netty.buffer.ByteBuf newDirectBuffer(int minCapacity, int maxCapacity) - Specified by:
newDirectBufferin classio.netty.buffer.AbstractByteBufAllocator
-
usedSizeInBytes
public long usedSizeInBytes()
-