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.AbstractByteBufAllocatorA 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 Classes Modifier and Type Class Description static classBufferPoolAllocator.WrappedA simple extension to UnpooledUnsafeDirectByteBuf that returns buffers to BufferPool on deallocate, and permits extracting the buffer from it to take ownership and use directly.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisDirectBufferPooled()protected io.netty.buffer.ByteBufnewDirectBuffer(int minCapacity, int maxCapacity)protected io.netty.buffer.ByteBufnewHeapBuffer(int minCapacity, int maxCapacity)shouldn't be invokedlongusedSizeInBytes()-
Methods 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 Detail
-
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()
-
-