Class BufferPool.LocalPool

  • Enclosing class:
    BufferPool

    public final class BufferPool.LocalPool
    extends java.lang.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 Detail

      • LocalPool

        public LocalPool()
    • Method Detail

      • put

        public void put​(java.nio.ByteBuffer buffer)
      • putUnusedPortion

        public void putUnusedPortion​(java.nio.ByteBuffer buffer)
      • get

        public java.nio.ByteBuffer get​(int size)
      • getAtLeast

        public java.nio.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()