org.apache.cassandra.db
Class CompactionManager

java.lang.Object
  extended by org.apache.cassandra.db.CompactionManager
All Implemented Interfaces:
CompactionManagerMBean

public class CompactionManager
extends java.lang.Object
implements CompactionManagerMBean


Field Summary
static java.lang.String MBEAN_OBJECT_NAME
           
 
Constructor Summary
CompactionManager()
           
 
Method Summary
 void disableCompactions()
           
 int getMaximumCompactionThreshold()
          Gets the maximum number of sstables in queue before compaction kicks off
 int getMinimumCompactionThreshold()
          Gets the minimum number of sstables in queue before compaction kicks off
static CompactionManager instance()
           
 void setMaximumCompactionThreshold(int threshold)
          Sets the maximum number of sstables in queue before compaction kicks off
 void setMinimumCompactionThreshold(int threshold)
          Sets the minimum number of sstables in queue before compaction kicks off
 java.util.concurrent.Future<java.lang.Integer> submit(ColumnFamilyStore columnFamilyStore)
          Call this whenever a compaction might be needed on the given columnfamily.
 java.util.concurrent.Future<java.util.List<SSTableReader>> submitAnti(ColumnFamilyStore columnFamilyStore, java.util.Collection<Range> ranges, java.net.InetAddress target)
           
 java.util.concurrent.Future submitCleanup(ColumnFamilyStore columnFamilyStore)
           
 java.util.concurrent.Future submitMajor(ColumnFamilyStore columnFamilyStore, long skip)
           
 java.util.concurrent.Future submitReadonly(ColumnFamilyStore columnFamilyStore, java.net.InetAddress initiator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MBEAN_OBJECT_NAME

public static java.lang.String MBEAN_OBJECT_NAME
Constructor Detail

CompactionManager

public CompactionManager()
Method Detail

instance

public static CompactionManager instance()

submit

public java.util.concurrent.Future<java.lang.Integer> submit(ColumnFamilyStore columnFamilyStore)
Call this whenever a compaction might be needed on the given columnfamily. It's okay to over-call (within reason) since the compactions are single-threaded, and if a call is unnecessary, it will just be no-oped in the bucketing phase.


submitCleanup

public java.util.concurrent.Future submitCleanup(ColumnFamilyStore columnFamilyStore)

submitAnti

public java.util.concurrent.Future<java.util.List<SSTableReader>> submitAnti(ColumnFamilyStore columnFamilyStore,
                                                                             java.util.Collection<Range> ranges,
                                                                             java.net.InetAddress target)

submitMajor

public java.util.concurrent.Future submitMajor(ColumnFamilyStore columnFamilyStore,
                                               long skip)

submitReadonly

public java.util.concurrent.Future submitReadonly(ColumnFamilyStore columnFamilyStore,
                                                  java.net.InetAddress initiator)

getMinimumCompactionThreshold

public int getMinimumCompactionThreshold()
Gets the minimum number of sstables in queue before compaction kicks off

Specified by:
getMinimumCompactionThreshold in interface CompactionManagerMBean

setMinimumCompactionThreshold

public void setMinimumCompactionThreshold(int threshold)
Sets the minimum number of sstables in queue before compaction kicks off

Specified by:
setMinimumCompactionThreshold in interface CompactionManagerMBean

getMaximumCompactionThreshold

public int getMaximumCompactionThreshold()
Gets the maximum number of sstables in queue before compaction kicks off

Specified by:
getMaximumCompactionThreshold in interface CompactionManagerMBean

setMaximumCompactionThreshold

public void setMaximumCompactionThreshold(int threshold)
Sets the maximum number of sstables in queue before compaction kicks off

Specified by:
setMaximumCompactionThreshold in interface CompactionManagerMBean

disableCompactions

public void disableCompactions()


Copyright © 2010 The Apache Software Foundation