Class BufferPool.LocalPool
- java.lang.Object
-
- org.apache.cassandra.utils.memory.BufferPool.LocalPool
-
- Enclosing class:
- BufferPool
public final class BufferPool.LocalPool extends java.lang.ObjectA 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 booleancanRecyclePartially()java.nio.ByteBufferget(int size)java.nio.ByteBuffergetAtLeast(int size)booleanisTinyPool()voidput(java.nio.ByteBuffer buffer)voidputUnusedPortion(java.nio.ByteBuffer buffer)voidrecycle(org.apache.cassandra.utils.memory.BufferPool.Chunk chunk)voidrecyclePartially(org.apache.cassandra.utils.memory.BufferPool.Chunk chunk)BufferPool.LocalPoolrecycleWhenFree(boolean recycleWhenFree)voidrelease()
-
-
-
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)
-
-