Class ThrottledUnfilteredIterator

java.lang.Object
org.apache.cassandra.utils.AbstractIterator<UnfilteredRowIterator>
org.apache.cassandra.db.rows.ThrottledUnfilteredIterator
All Implemented Interfaces:
com.google.common.collect.PeekingIterator<UnfilteredRowIterator>, AutoCloseable, Iterator<UnfilteredRowIterator>, CloseableIterator<UnfilteredRowIterator>

public class ThrottledUnfilteredIterator extends AbstractIterator<UnfilteredRowIterator> implements CloseableIterator<UnfilteredRowIterator>
A utility class to split the given UnfilteredRowIterator into smaller chunks each having at most throttle + 1 unfiltereds. Only the first output contains partition level info: UnfilteredRowIterator.partitionLevelDeletion() and BaseRowIterator.staticRow(). Besides splitting, this iterator will also ensure each chunk does not finish with an open tombstone marker, by closing any opened tombstone markers and re-opening on the next chunk. The lifecycle of outputed {UnfilteredRowIterator only last till next call to AbstractIterator.next(). A subsequent AbstractIterator.next call will exhaust the previously returned iterator before computing the next, effectively skipping unfiltereds up to the throttle size. Closing this iterator will close the underlying iterator.