UnfilteredRowIterator (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.db.rows

## Interface UnfilteredRowIterator

- All Superinterfaces:
    java.lang.AutoCloseable, BaseRowIterator<Unfiltered>, CloseableIterator<Unfiltered>, java.util.Iterator<Unfiltered>
  All Known Implementing Classes:
    AbstractBTreePartition.SlicesIterator, AbstractSSTableIterator, AbstractUnfilteredRowIterator, LazilyInitializedUnfilteredRowIterator, RowAndDeletionMergeIterator, SSTableIdentityIterator, SSTableIterator, SSTableReversedIterator, StreamReader.StreamDeserializer, UnfilteredRowIteratorWithLowerBound, WrappingUnfilteredRowIterator

      public interface UnfilteredRowIterator
      extends BaseRowIterator<Unfiltered>

  An iterator over the rows of a given partition that also includes deletion informations.

  An `UnfilteredRowIterator` contains a few partition top-level informations and is an iterator of `Unfiltered`, that is of either `Row` or `RangeTombstoneMarker`. An implementation of `UnfilteredRowIterator` must provide the following guarantees: 1. the returned `Unfiltered` must be in clustering order, or in reverse clustering order iff `BaseRowIterator.isReverseOrder()` returns true. 2. the iterator should not shadow its own data. That is, no deletion (partition level deletion, row deletion, range tombstone, complex deletion) should delete anything else returned by the iterator (cell, row, ...). 3. every "start" range tombstone marker should have a corresponding "end" marker, and no other marker should be in-between this start-end pair of marker. Note that due to the previous rule this means that between a "start" and a corresponding "end" marker there can only be rows that are not deleted by the markers. Also note that when iterating in reverse order, "end" markers are returned before their "start" counterpart (i.e. "start" and "end" are always in the sense of the clustering order). Note further that the objects returned by next() are only valid until the next call to hasNext() or next(). If a consumer wants to keep a reference on the returned objects for longer than the iteration, it must make a copy of it explicitly.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default boolean` | `isEmpty()` Returns whether this iterator has no data (including no deletion data).
    `DeletionTime` | `partitionLevelDeletion()` The partition level deletion for the partition this iterate over.
    `EncodingStats` | `stats()` Return "statistics" about what is returned by this iterator.

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

      `columns, isReverseOrder, metadata, partitionKey, staticRow`

    - ### Methods inherited from interface org.apache.cassandra.utils.CloseableIterator

      `close`

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

      `forEachRemaining, hasNext, next, remove`

- - ### Method Detail

    - #### partitionLevelDeletion

          DeletionTime partitionLevelDeletion()

      The partition level deletion for the partition this iterate over.

    - #### stats

          EncodingStats stats()

      Return "statistics" about what is returned by this iterator. Those are used for performance reasons (for delta-encoding for instance) and code should not expect those to be exact.

    - #### isEmpty

          default boolean isEmpty()

      Returns whether this iterator has no data (including no deletion data).
      Specified by:
        `isEmpty` in interface `BaseRowIterator<Unfiltered>`

Copyright © 2018 The Apache Software Foundation