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 
    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.
  • Field Summary

    Fields inherited from interface io.netty.buffer.ByteBufAllocator

    DEFAULT
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    protected io.netty.buffer.ByteBuf
    newDirectBuffer(int minCapacity, int maxCapacity)
     
    protected io.netty.buffer.ByteBuf
    newHeapBuffer(int minCapacity, int maxCapacity)
    shouldn't be invoked
    long
     

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • isDirectBufferPooled

      public boolean isDirectBufferPooled()
    • newHeapBuffer

      protected io.netty.buffer.ByteBuf newHeapBuffer(int minCapacity, int maxCapacity)
      shouldn't be invoked
      Specified by:
      newHeapBuffer in class io.netty.buffer.AbstractByteBufAllocator
    • newDirectBuffer

      protected io.netty.buffer.ByteBuf newDirectBuffer(int minCapacity, int maxCapacity)
      Specified by:
      newDirectBuffer in class io.netty.buffer.AbstractByteBufAllocator
    • usedSizeInBytes

      public long usedSizeInBytes()