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 Classes Modifier and Type Class Description static class
BufferPoolAllocator.Wrapped
A 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 boolean
isDirectBufferPooled()
protected io.netty.buffer.ByteBuf
newDirectBuffer(int minCapacity, int maxCapacity)
protected io.netty.buffer.ByteBuf
newHeapBuffer(int minCapacity, int maxCapacity)
shouldn't be invokedlong
usedSizeInBytes()
-
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:
newHeapBuffer
in classio.netty.buffer.AbstractByteBufAllocator
-
newDirectBuffer
protected io.netty.buffer.ByteBuf newDirectBuffer(int minCapacity, int maxCapacity)
- Specified by:
newDirectBuffer
in classio.netty.buffer.AbstractByteBufAllocator
-
usedSizeInBytes
public long usedSizeInBytes()
-
-