AbstractCompactionTask (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.db.compaction

## Class AbstractCompactionTask

- java.lang.Object
- - org.apache.cassandra.utils.WrappedRunnable
  - - org.apache.cassandra.db.compaction.AbstractCompactionTask

- All Implemented Interfaces:
    java.lang.Runnable
  Direct Known Subclasses:
    CompactionTask

      public abstract class AbstractCompactionTask
      extends WrappedRunnable

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ColumnFamilyStore` | `cfs`
    `protected OperationType` | `compactionType`
    `protected boolean` | `isUserDefined`
    `protected LifecycleTransaction` | `transaction`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractCompactionTask(ColumnFamilyStore cfs, LifecycleTransaction transaction)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `execute(CompactionManager.CompactionExecutorStatsCollector collector)` executes the task and unmarks sstables compacting
    `protected abstract int` | `executeInternal(CompactionManager.CompactionExecutorStatsCollector collector)`
    `abstract CompactionAwareWriter` | `getCompactionAwareWriter(ColumnFamilyStore cfs, LifecycleTransaction txn, java.util.Set<SSTableReader> nonExpiredSSTables)`
    `AbstractCompactionTask` | `setCompactionType(OperationType compactionType)`
    `AbstractCompactionTask` | `setUserDefined(boolean isUserDefined)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.apache.cassandra.utils.WrappedRunnable

      `run, runMayThrow`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### cfs

          protected final ColumnFamilyStore cfs

    - #### transaction

          protected LifecycleTransaction transaction

    - #### isUserDefined

          protected boolean isUserDefined

    - #### compactionType

          protected OperationType compactionType

  - ### Constructor Detail

    - #### AbstractCompactionTask

          public AbstractCompactionTask(ColumnFamilyStore cfs,
                                        LifecycleTransaction transaction)

      Parameters:
        `cfs` -
        `transaction` - the modifying managing the status of the sstables we're replacing

  - ### Method Detail

    - #### execute

          public int execute(CompactionManager.CompactionExecutorStatsCollector collector)

      executes the task and unmarks sstables compacting

    - #### getCompactionAwareWriter

          public abstract CompactionAwareWriter getCompactionAwareWriter(ColumnFamilyStore cfs,
                                                                         LifecycleTransaction txn,
                                                                         java.util.Set<SSTableReader> nonExpiredSSTables)

    - #### executeInternal

          protected abstract int executeInternal(CompactionManager.CompactionExecutorStatsCollector collector)

    - #### setUserDefined

          public AbstractCompactionTask setUserDefined(boolean isUserDefined)

    - #### setCompactionType

          public AbstractCompactionTask setCompactionType(OperationType compactionType)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2018 The Apache Software Foundation