Class ComplexColumnData

  • All Implemented Interfaces:
    java.lang.Iterable<Cell<?>>, IMeasurableMemory

    public class ComplexColumnData
    extends ColumnData
    implements java.lang.Iterable<Cell<?>>
    The data for a complex column, that is it's cells and potential complex deletion time.
    • Method Detail

      • cellsCount

        public int cellsCount()
      • getCellByIndex

        public Cell<?> getCellByIndex​(int idx)
      • complexDeletion

        public DeletionTime complexDeletion()
        The complex deletion time of the complex column.

        The returned "complex deletion" is a deletion of all the cells of the column. For instance, for a collection, this correspond to a full collection deletion. Please note that this deletion says nothing about the individual cells of the complex column: there can be no complex deletion but some of the individual cells can be deleted.

        Returns:
        the complex deletion time for the column this is the data of or DeletionTime.LIVE if the column is not deleted.
      • iterator

        public java.util.Iterator<Cell<?>> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<Cell<?>>
      • reverseIterator

        public java.util.Iterator<Cell<?>> reverseIterator()
      • accumulate

        public long accumulate​(LongAccumulator<Cell<?>> accumulator,
                               long initialValue)
      • accumulate

        public <A> long accumulate​(BiLongAccumulator<A,​Cell<?>> accumulator,
                                   A arg,
                                   long initialValue)
      • dataSize

        public int dataSize()
        Description copied from class: ColumnData
        The size of the data hold by this ColumnData.
        Specified by:
        dataSize in class ColumnData
        Returns:
        the size used by the data of this ColumnData.
      • unsharedHeapSize

        public long unsharedHeapSize()
        Specified by:
        unsharedHeapSize in interface IMeasurableMemory
        Specified by:
        unsharedHeapSize in class ColumnData
        Returns:
        the amount of on-heap memory retained by the object that might be reclaimed if the object were reclaimed, i.e. it should try to exclude globally cached data where possible, or counting portions of arrays that are referenced by the object but used by other objects only (e.g. slabbed byte-buffers), etc.
      • validate

        public void validate()
        Description copied from class: ColumnData
        Validate the column data.
        Specified by:
        validate in class ColumnData
      • digest

        public void digest​(Digest digest)
        Description copied from class: ColumnData
        Adds the data to the provided digest.
        Specified by:
        digest in class ColumnData
        Parameters:
        digest - the Digest to add the data to.
      • hasInvalidDeletions

        public boolean hasInvalidDeletions()
        Description copied from class: ColumnData
        Validates the deletions (ttl and local deletion time) if any.
        Specified by:
        hasInvalidDeletions in class ColumnData
        Returns:
        true if it has any invalid deletions, false otherwise
      • transformAndFilter

        public ComplexColumnData transformAndFilter​(com.google.common.base.Function<? super Cell<?>,​? extends Cell<?>> function)
      • transform

        public <V> ComplexColumnData transform​(com.google.common.base.Function<? super Cell<?>,​? extends Cell<?>> function)
      • updateAllTimestamp

        public ComplexColumnData updateAllTimestamp​(long newTimestamp)
        Description copied from class: ColumnData
        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.
        Specified by:
        updateAllTimestamp in class ColumnData
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object