org.apache.cassandra.db.compaction

## Class PrecompactedRow

- java.lang.Object
- - org.apache.cassandra.db.compaction.AbstractCompactedRow
  - - org.apache.cassandra.db.compaction.PrecompactedRow

All Implemented Interfaces:
  java.io.Closeable, java.lang.AutoCloseable

    public class PrecompactedRow
    extends AbstractCompactedRow

PrecompactedRow merges its rows in its constructor in memory.

### Field Summary

### Fields inherited from class org.apache.cassandra.db.compaction.AbstractCompactedRow

`key`

### Constructor Summary

Constructors
Constructor and Description
`PrecompactedRow(CompactionController controller, java.util.List<SSTableIdentityIterator> rows)`
`PrecompactedRow(DecoratedKey key, ColumnFamily cf)`

### Method Summary

Methods
`void` `close()`
`ColumnStats` `columnStats()`
`ColumnFamily` `getFullColumnFamily()`
`static void` `merge(ColumnFamily returnCF, java.util.List<CloseableIterator<Column>> data, SecondaryIndexManager.Updater indexer)`
`static ColumnFamily` `removeDeleted(DecoratedKey key, boolean shouldPurge, CompactionController controller, ColumnFamily cf)`
`static ColumnFamily` `removeDeleted(DecoratedKey key, CompactionController controller, ColumnFamily cf)`
`void` `update(java.security.MessageDigest digest)` update @param digest with the data bytes of the row (not including row key or row size).
`RowIndexEntry` `write(long currentPosition, java.io.DataOutput out)` write the row (size + column index + filter + column data, but NOT row key) to @param out.

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

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

### Constructor Detail

#### PrecompactedRow

    public PrecompactedRow(DecoratedKey key,
                   ColumnFamily cf)

#### PrecompactedRow

    public PrecompactedRow(CompactionController controller,
                   java.util.List<SSTableIdentityIterator> rows)

### Method Detail

#### removeDeleted

    public static ColumnFamily removeDeleted(DecoratedKey key,
                             CompactionController controller,
                             ColumnFamily cf)

#### removeDeleted

    public static ColumnFamily removeDeleted(DecoratedKey key,
                             boolean shouldPurge,
                             CompactionController controller,
                             ColumnFamily cf)

#### merge

    public static void merge(ColumnFamily returnCF,
             java.util.List<CloseableIterator<Column>> data,
             SecondaryIndexManager.Updater indexer)

#### write

    public RowIndexEntry write(long currentPosition,
                      java.io.DataOutput out)
                        throws java.io.IOException

Description copied from class: `AbstractCompactedRow`
write the row (size + column index + filter + column data, but NOT row key) to @param out. write() may change internal state; it is NOT valid to call write() or update() a second time.

Specified by:
  `write` in class `AbstractCompactedRow`
Returns:
  index information for the written row, or null if the compaction resulted in only expired tombstones.
Throws:
  `java.io.IOException`

#### update

    public void update(java.security.MessageDigest digest)

Description copied from class: `AbstractCompactedRow`
update @param digest with the data bytes of the row (not including row key or row size). May be called even if empty. update() may change internal state; it is NOT valid to call write() or update() a second time.

Specified by:
  `update` in class `AbstractCompactedRow`

#### columnStats

    public ColumnStats columnStats()

Specified by:
  `columnStats` in class `AbstractCompactedRow`
Returns:
  aggregate information about the columns in this row. Some fields may contain default values if computing them value would require extra effort we're not willing to make.

#### getFullColumnFamily

    public ColumnFamily getFullColumnFamily()

Returns:
  the full column family represented by this compacted row. We do not provide this method for other AbstractCompactedRow, because this fits the whole row into memory and don't make sense for those other implementations.

#### close

    public void close()