AbstractCompactionTask (apache-cassandra API)
Date: 2012-05-04

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.db.compaction
Class AbstractCompactionTask

    java.lang.Object
      org.apache.cassandra.db.compaction.AbstractCompactionTask

Direct Known Subclasses:
  CompactionTask

    public abstract class AbstractCompactionTask

extends java.lang.Object

Field Summary
`protected ColumnFamilyStore` | `cfs`
`protected java.util.Collection<SSTableReader>` | `sstables`

Constructor Summary
`AbstractCompactionTask(ColumnFamilyStore cfs, java.util.Collection<SSTableReader> sstables)`

Method Summary
`protected void` | `cancel()`
`abstract int` | `execute(CompactionManager.CompactionExecutorStatsCollector collector)`
`ColumnFamilyStore` | `getColumnFamilyStore()`
`java.util.Collection<SSTableReader>` | `getSSTables()`
`boolean` | `markSSTablesForCompaction()` Try to mark the sstable to compact as compacting.
`boolean` | `markSSTablesForCompaction(int min, int max)`
`void` | `unmarkSSTables()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### cfs

    protected ColumnFamilyStore cfs

### sstables

    protected java.util.Collection<SSTableReader> sstables

Constructor Detail

### AbstractCompactionTask

    public AbstractCompactionTask(ColumnFamilyStore cfs,
                                  java.util.Collection<SSTableReader> sstables)

Method Detail

### execute

    public abstract int execute(CompactionManager.CompactionExecutorStatsCollector collector)
                         throws java.io.IOException

  Throws:
    `java.io.IOException`

### getColumnFamilyStore

    public ColumnFamilyStore getColumnFamilyStore()

### getSSTables

    public java.util.Collection<SSTableReader> getSSTables()

### markSSTablesForCompaction

    public boolean markSSTablesForCompaction()

  Try to mark the sstable to compact as compacting. It returns true if some sstables have been marked for compaction, false otherwise. This *must* be called before calling execute(). Moreover, unmarkSSTables *must* always be called after execute() if this method returns true.

### markSSTablesForCompaction

    public boolean markSSTablesForCompaction(int min,
                                             int max)

### unmarkSSTables

    public void unmarkSSTables()

### cancel

    protected void cancel()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 The Apache Software Foundation