org.apache.cassandra.db.compaction

## Class AbstractCompactedRow

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

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

Direct Known Subclasses:
  LazilyCompactedRow

    public abstract class AbstractCompactedRow
    extends java.lang.Object
    implements java.io.Closeable

a CompactedRow is an object that takes a bunch of rows (keys + columnfamilies) and can write a compacted version of those rows to an output stream. It does NOT necessarily require creating a merged CF object in memory.

### Field Summary

Fields
`DecoratedKey` `key`

### Constructor Summary

Constructors
Constructor and Description
`AbstractCompactedRow(DecoratedKey key)`

### Method Summary

All Methods Instance Methods Abstract Methods
`abstract ColumnStats` `columnStats()`
`abstract void` `update(java.security.MessageDigest digest)` update @param digest with the data bytes of the row (not including row key or row size).
`abstract RowIndexEntry` `write(long currentPosition, SequentialWriter 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`

### Methods inherited from interface java.io.Closeable

`close`

### Field Detail

#### key

    public final DecoratedKey key

### Constructor Detail

#### AbstractCompactedRow

    public AbstractCompactedRow(DecoratedKey key)

### Method Detail

#### write

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

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.

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

#### update

    public abstract void update(java.security.MessageDigest digest)

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.

#### columnStats

    public abstract ColumnStats columnStats()

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.