Class BufferPool.LocalPool
- java.lang.Object
-
- org.apache.cassandra.utils.memory.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 Summary
Constructors Constructor Description LocalPool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRecyclePartially()
java.nio.ByteBuffer
get(int size)
java.nio.ByteBuffer
getAtLeast(int size)
boolean
isTinyPool()
void
put(java.nio.ByteBuffer buffer)
void
putUnusedPortion(java.nio.ByteBuffer buffer)
void
recycle(org.apache.cassandra.utils.memory.BufferPool.Chunk chunk)
void
recyclePartially(org.apache.cassandra.utils.memory.BufferPool.Chunk chunk)
BufferPool.LocalPool
recycleWhenFree(boolean recycleWhenFree)
void
release()
-
-
-
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()
-
recycleWhenFree
public BufferPool.LocalPool recycleWhenFree(boolean recycleWhenFree)
-
-