Class 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 Detail

      • comparator

        public static final java.util.Comparator<ColumnData> comparator
    • Constructor Detail

    • Method Detail

      • column

        public final ColumnMetadata 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.
      • hasInvalidDeletions

        public abstract boolean hasInvalidDeletions()
        Validates the deletions (ttl and local deletion time) if any.
        Returns:
        true if it has any invalid deletions, false otherwise
      • digest

        public abstract void digest​(Digest digest)
        Adds the data to the provided digest.
        Parameters:
        digest - the Digest 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 for additional details.
      • markCounterLocalToBeCleared

        public abstract ColumnData markCounterLocalToBeCleared()
      • maxTimestamp

        public abstract long maxTimestamp()