Package org.apache.cassandra.db.rows
Class LazilyInitializedUnfilteredRowIterator
- java.lang.Object
-
- org.apache.cassandra.utils.AbstractIterator<Unfiltered>
-
- org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator
-
- All Implemented Interfaces:
com.google.common.collect.PeekingIterator<Unfiltered>,java.lang.AutoCloseable,java.util.Iterator<Unfiltered>,BaseRowIterator<Unfiltered>,UnfilteredRowIterator,CloseableIterator<Unfiltered>
- Direct Known Subclasses:
UnfilteredRowIteratorWithLowerBound
public abstract class LazilyInitializedUnfilteredRowIterator extends AbstractIterator<Unfiltered> implements UnfilteredRowIterator
Abstract class to create UnfilteredRowIterator that lazily initialize themselves. This is used during partition range queries when we know the partition key but want to defer the initialization of the rest of the UnfilteredRowIterator until we need those informations. SeeBigTableScanner.KeyScanningIteratorfor instance.
-
-
Constructor Summary
Constructors Constructor Description LazilyInitializedUnfilteredRowIterator(DecoratedKey partitionKey)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()RegularAndStaticColumnscolumns()A subset of the columns for the (static and regular) rows returned by this iterator.protected UnfilteredcomputeNext()booleaninitialized()protected abstract UnfilteredRowIteratorinitializeIterator()booleanisReverseOrder()Whether or not the rows returned by this iterator are in reversed clustering order.protected voidmaybeInit()TableMetadatametadata()The metadata for the table this iterator on.DecoratedKeypartitionKey()The partition key of the partition this in an iterator over.DeletionTimepartitionLevelDeletion()The partition level deletion for the partition this iterate over.RowstaticRow()The static part corresponding to this partition (this can be an empty row but cannot benull).EncodingStatsstats()Return "statistics" about what is returned by this iterator.-
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
-
-
-
-
Constructor Detail
-
LazilyInitializedUnfilteredRowIterator
public LazilyInitializedUnfilteredRowIterator(DecoratedKey partitionKey)
-
-
Method Detail
-
initializeIterator
protected abstract UnfilteredRowIterator initializeIterator()
-
maybeInit
protected void maybeInit()
-
initialized
public boolean initialized()
-
metadata
public TableMetadata metadata()
Description copied from interface:BaseRowIteratorThe metadata for the table this iterator on.- Specified by:
metadatain interfaceBaseRowIterator<Unfiltered>
-
columns
public RegularAndStaticColumns columns()
Description copied from interface:BaseRowIteratorA subset of the columns for the (static and regular) rows returned by this iterator. Every row returned by this iterator must guarantee that it has only those columns.- Specified by:
columnsin interfaceBaseRowIterator<Unfiltered>
-
isReverseOrder
public boolean isReverseOrder()
Description copied from interface:BaseRowIteratorWhether or not the rows returned by this iterator are in reversed clustering order.- Specified by:
isReverseOrderin interfaceBaseRowIterator<Unfiltered>
-
partitionKey
public DecoratedKey partitionKey()
Description copied from interface:BaseRowIteratorThe partition key of the partition this in an iterator over.- Specified by:
partitionKeyin interfaceBaseRowIterator<Unfiltered>
-
partitionLevelDeletion
public DeletionTime partitionLevelDeletion()
Description copied from interface:UnfilteredRowIteratorThe partition level deletion for the partition this iterate over.- Specified by:
partitionLevelDeletionin interfaceUnfilteredRowIterator
-
staticRow
public Row staticRow()
Description copied from interface:BaseRowIteratorThe static part corresponding to this partition (this can be an empty row but cannot benull).- Specified by:
staticRowin interfaceBaseRowIterator<Unfiltered>
-
stats
public EncodingStats stats()
Description copied from interface:UnfilteredRowIteratorReturn "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.- Specified by:
statsin interfaceUnfilteredRowIterator
-
computeNext
protected Unfiltered computeNext()
- Specified by:
computeNextin classAbstractIterator<Unfiltered>
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceCloseableIterator<Unfiltered>- Overrides:
closein classAbstractIterator<Unfiltered>
-
-