Class MemtableCleanerThread<P extends MemtablePool>
java.lang.Object
org.apache.cassandra.utils.memory.MemtableCleanerThread<P>
- All Implemented Interfaces:
Interruptible,Shutdownable
A thread that reclaims memory from a MemtablePool on demand. The actual reclaiming work is delegated to the
cleaner Runnable, e.g., MemtableCleaner
AbstractAllocatorMemtable#flushLargestMemtable().-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.cassandra.concurrent.Interruptible
Interruptible.SimpleTask, Interruptible.State, Interruptible.Task, Interruptible.TerminateException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long timeout, TimeUnit units) Await termination of this object, i.e.voidbooleanintReturn the number of pending tasksvoidshutdown()Shutdown once any remaining work has completed (however this is defined for the implementation).Shutdown immediately, possibly interrupting ongoing work, and cancelling work that is queued.voidtrigger()
-
Constructor Details
-
MemtableCleanerThread
-
-
Method Details
-
trigger
public void trigger() -
numPendingTasks
public int numPendingTasks()Return the number of pending tasks -
interrupt
public void interrupt()- Specified by:
interruptin interfaceInterruptible
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceShutdownable
-
shutdown
public void shutdown()Description copied from interface:ShutdownableShutdown once any remaining work has completed (however this is defined for the implementation).- Specified by:
shutdownin interfaceShutdownable
-
shutdownNow
Description copied from interface:ShutdownableShutdown immediately, possibly interrupting ongoing work, and cancelling work that is queued.- Specified by:
shutdownNowin interfaceShutdownable
-
awaitTermination
Description copied from interface:ShutdownableAwait termination of this object, i.e. the cessation of all current and future work.- Specified by:
awaitTerminationin interfaceShutdownable- Throws:
InterruptedException
-