org.apache.cassandra.db.rows

## Class RowAndDeletionMergeIterator

- java.lang.Object
- - org.apache.cassandra.utils.AbstractIterator<Unfiltered>
  - - org.apache.cassandra.db.rows.AbstractUnfilteredRowIterator
    - - org.apache.cassandra.db.rows.RowAndDeletionMergeIterator

- All Implemented Interfaces:
    com.google.common.collect.PeekingIterator<Unfiltered>, java.lang.AutoCloseable, java.util.Iterator<Unfiltered>, BaseRowIterator<Unfiltered>, UnfilteredRowIterator, CloseableIterator<Unfiltered>

      public class RowAndDeletionMergeIterator
      extends AbstractUnfilteredRowIterator

  An iterator that merges a source of rows with the range tombstone and partition level deletion of a give partition.

  This is used by our `Partition` implementations to produce a `UnfilteredRowIterator` by merging the rows and deletion infos that are kept separate. This has also 2 additional role: 1) this make sure the row returned only includes the columns selected for the resulting iterator. 2) this (optionally) remove any data that can be shadowed (see commet on 'removeShadowedData' below for more details)

- - ### Field Summary

    - ### Fields inherited from class org.apache.cassandra.db.rows.AbstractUnfilteredRowIterator

      `columns, isReverseOrder, metadata, partitionKey, partitionLevelDeletion, staticRow, stats`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RowAndDeletionMergeIterator(CFMetaData metadata, DecoratedKey partitionKey, DeletionTime partitionLevelDeletion, ColumnFilter selection, Row staticRow, boolean isReversed, EncodingStats stats, java.util.Iterator<Row> rows, java.util.Iterator<RangeTombstone> ranges, boolean removeShadowedData)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Unfiltered` | `computeNext()`

    - ### Methods inherited from class org.apache.cassandra.db.rows.AbstractUnfilteredRowIterator

      `close, columns, isReverseOrder, metadata, partitionKey, partitionLevelDeletion, staticRow, stats`

    - ### Methods inherited from class org.apache.cassandra.utils.AbstractIterator

      `endOfData, hasNext, next, peek, remove`

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

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

    - ### Methods inherited from interface org.apache.cassandra.db.rows.UnfilteredRowIterator

      `isEmpty`

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining, hasNext, next, remove`

- - ### Constructor Detail

    - #### RowAndDeletionMergeIterator

          public RowAndDeletionMergeIterator(CFMetaData metadata,
                                             DecoratedKey partitionKey,
                                             DeletionTime partitionLevelDeletion,
                                             ColumnFilter selection,
                                             Row staticRow,
                                             boolean isReversed,
                                             EncodingStats stats,
                                             java.util.Iterator<Row> rows,
                                             java.util.Iterator<RangeTombstone> ranges,
                                             boolean removeShadowedData)

  - ### Method Detail

    - #### computeNext

          protected Unfiltered computeNext()

      Specified by:
        `computeNext` in class `AbstractIterator<Unfiltered>`

Copyright © 2018 The Apache Software Foundation