Class MemtablePool
- java.lang.Object
-
- org.apache.cassandra.utils.memory.MemtablePool
-
- Direct Known Subclasses:
HeapPool
,HeapPool.Logged
,NativePool
,SlabPool
public abstract class MemtablePool extends java.lang.Object
Represents an amount of memory used for a given purpose, that can be allocated to specific tasks through child MemtableAllocator objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MemtablePool.SubPool
Note the difference between acquire() and allocate(); allocate() makes more resources available to all owners, and acquire() makes shared resources unavailable but still recorded.
-
Field Summary
Fields Modifier and Type Field Description com.codahale.metrics.Timer
blockedOnAllocating
com.codahale.metrics.Gauge<java.lang.Long>
numPendingTasks
MemtablePool.SubPool
offHeap
MemtablePool.SubPool
onHeap
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Long
getNumPendingtasks()
boolean
needsCleaning()
abstract MemtableAllocator
newAllocator(java.lang.String table)
void
shutdownAndWait(long timeout, java.util.concurrent.TimeUnit unit)
-
-
-
Field Detail
-
onHeap
public final MemtablePool.SubPool onHeap
-
offHeap
public final MemtablePool.SubPool offHeap
-
blockedOnAllocating
public final com.codahale.metrics.Timer blockedOnAllocating
-
numPendingTasks
public final com.codahale.metrics.Gauge<java.lang.Long> numPendingTasks
-
-
Method Detail
-
shutdownAndWait
public void shutdownAndWait(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException
- Throws:
java.lang.InterruptedException
java.util.concurrent.TimeoutException
-
newAllocator
public abstract MemtableAllocator newAllocator(java.lang.String table)
-
needsCleaning
public boolean needsCleaning()
-
getNumPendingtasks
public java.lang.Long getNumPendingtasks()
-
-