Class BufferPool.LocalPool

java.lang.Object
org.apache.cassandra.utils.memory.BufferPool.LocalPool
Enclosing class:
BufferPool

public final class BufferPool.LocalPool extends Object
A thread local class that grabs chunks from the global pool for this thread allocations. Only one thread can do the allocations but multiple threads can release the allocations.
  • Constructor Details

    • LocalPool

      public LocalPool()
  • Method Details

    • put

      public void put(ByteBuffer buffer)
    • putUnusedPortion

      public void putUnusedPortion(ByteBuffer buffer)
    • get

      public ByteBuffer get(int size)
    • getAtLeast

      public ByteBuffer getAtLeast(int size)
    • recycle

      public void recycle(org.apache.cassandra.utils.memory.BufferPool.Chunk chunk)
    • recyclePartially

      public void recyclePartially(org.apache.cassandra.utils.memory.BufferPool.Chunk chunk)
    • canRecyclePartially

      public boolean canRecyclePartially()
    • release

      public void release()
    • isTinyPool

      public boolean isTinyPool()
    • recycleWhenFree

      public BufferPool.LocalPool recycleWhenFree(boolean recycleWhenFree)