org.apache.cassandra.db.rows

## Class ColumnData

- java.lang.Object
- - org.apache.cassandra.db.rows.ColumnData

Direct Known Subclasses:
  Cell, ComplexColumnData

    public abstract class ColumnData
    extends java.lang.Object

Generic interface for the data of a given column (inside a row). In practice, there is only 2 implementations of this: either `Cell` for simple columns or `ComplexColumnData` for complex columns.

### Field Summary

Fields
`protected ColumnDefinition` `column`
`static java.util.Comparator<ColumnData>` `comparator`

### Constructor Summary

Constructors
`protected` `ColumnData(ColumnDefinition column)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`ColumnDefinition` `column()` The column this is data for.
`abstract int` `dataSize()` The size of the data hold by this `ColumnData`.
`abstract void` `digest(java.security.MessageDigest digest)` Adds the data to the provided digest.
`abstract ColumnData` `markCounterLocalToBeCleared()`
`abstract long` `maxTimestamp()`
`abstract ColumnData` `purge(DeletionPurger purger, int nowInSec)`
`abstract long` `unsharedHeapSizeExcludingData()`
`abstract ColumnData` `updateAllTimestamp(long newTimestamp)` Returns a copy of the data where all timestamps for live data have replaced by `newTimestamp` and all deletion timestamp by `newTimestamp - 1`.
`abstract void` `validate()` Validate the column data.

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

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

### Field Detail

#### comparator

    public static final java.util.Comparator<ColumnData> comparator

#### column

    protected final ColumnDefinition column

### Constructor Detail

#### ColumnData

    protected ColumnData(ColumnDefinition column)

### Method Detail

#### column

    public final ColumnDefinition column()

The column this is data for.

Returns:
  the column this is a data for.

#### dataSize

    public abstract int dataSize()

The size of the data hold by this `ColumnData`.

Returns:
  the size used by the data of this `ColumnData`.

#### unsharedHeapSizeExcludingData

    public abstract long unsharedHeapSizeExcludingData()

#### validate

    public abstract void validate()

Validate the column data.

Throws:
  `MarshalException` - if the data is not valid.

#### digest

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

Adds the data to the provided digest.

Parameters:
  `digest` - the `MessageDigest` to add the data to.

#### updateAllTimestamp

    public abstract ColumnData updateAllTimestamp(long newTimestamp)

Returns a copy of the data where all timestamps for live data have replaced by `newTimestamp` and all deletion timestamp by `newTimestamp - 1`. This exists for the Paxos path, see `PartitionUpdate.updateAllTimestamp(long)` for additional details.

#### markCounterLocalToBeCleared

    public abstract ColumnData markCounterLocalToBeCleared()

#### purge

    public abstract ColumnData purge(DeletionPurger purger,
                                     int nowInSec)

#### maxTimestamp

    public abstract long maxTimestamp()