Class MemtableCleanerThread<P extends MemtablePool>
- java.lang.Object
-
- org.apache.cassandra.utils.memory.MemtableCleanerThread<P>
-
- All Implemented Interfaces:
Interruptible
,Shutdownable
public class MemtableCleanerThread<P extends MemtablePool> extends java.lang.Object implements Interruptible
A thread that reclaims memory from a MemtablePool on demand. The actual reclaiming work is delegated to the cleaner Runnable, e.g., FlushLargestColumnFamily
-
-
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 Constructor Description MemtableCleanerThread(P pool, MemtableCleaner cleaner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
awaitTermination(long timeout, java.util.concurrent.TimeUnit units)
Await termination of this object, i.e.void
interrupt()
boolean
isTerminated()
int
numPendingTasks()
Return the number of pending tasksvoid
shutdown()
Shutdown once any remaining work has completed (however this is defined for the implementation).java.lang.Object
shutdownNow()
Shutdown immediately, possibly interrupting ongoing work, and cancelling work that is queued.void
trigger()
-
-
-
Constructor Detail
-
MemtableCleanerThread
public MemtableCleanerThread(P pool, MemtableCleaner cleaner)
-
-
Method Detail
-
trigger
public void trigger()
-
numPendingTasks
public int numPendingTasks()
Return the number of pending tasks
-
interrupt
public void interrupt()
- Specified by:
interrupt
in interfaceInterruptible
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfaceShutdownable
-
shutdown
public void shutdown()
Description copied from interface:Shutdownable
Shutdown once any remaining work has completed (however this is defined for the implementation).- Specified by:
shutdown
in interfaceShutdownable
-
shutdownNow
public java.lang.Object shutdownNow()
Description copied from interface:Shutdownable
Shutdown immediately, possibly interrupting ongoing work, and cancelling work that is queued.- Specified by:
shutdownNow
in interfaceShutdownable
-
awaitTermination
public boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit units) throws java.lang.InterruptedException
Description copied from interface:Shutdownable
Await termination of this object, i.e. the cessation of all current and future work.- Specified by:
awaitTermination
in interfaceShutdownable
- Throws:
java.lang.InterruptedException
-
-