public class SSTableSliceIterator extends java.lang.Object implements OnDiskAtomIterator
| Constructor and Description |
|---|
SSTableSliceIterator(SSTableReader sstable,
DecoratedKey key,
ColumnSlice[] slices,
boolean reversed) |
SSTableSliceIterator(SSTableReader sstable,
FileDataInput file,
DecoratedKey key,
ColumnSlice[] slices,
boolean reversed,
RowIndexEntry indexEntry)
An iterator for a slice within an SSTable
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
clean up any open resources
|
ColumnFamily |
getColumnFamily() |
DecoratedKey |
getKey() |
boolean |
hasNext() |
OnDiskAtom |
next() |
void |
remove() |
public SSTableSliceIterator(SSTableReader sstable, DecoratedKey key, ColumnSlice[] slices, boolean reversed)
public SSTableSliceIterator(SSTableReader sstable, FileDataInput file, DecoratedKey key, ColumnSlice[] slices, boolean reversed, RowIndexEntry indexEntry)
sstable - Keyspace for the CFS we are reading fromfile - Optional parameter that input is read from. If null is passed, this class creates an appropriate one automatically.
If this class creates, it will close the underlying file when #close() is called.
If a caller passes a non-null argument, this class will NOT close the underlying file when the iterator is closed (i.e. the caller is responsible for closing the file)
In all cases the caller should explicitly #close() this iterator.key - The key the requested slice resides underslices - the column slicesreversed - Results are returned in reverse order iff reversed is true.indexEntry - position of the rowpublic DecoratedKey getKey()
getKey in interface OnDiskAtomIteratorpublic ColumnFamily getColumnFamily()
getColumnFamily in interface OnDiskAtomIteratorpublic boolean hasNext()
hasNext in interface java.util.Iterator<OnDiskAtom>public OnDiskAtom next()
next in interface java.util.Iterator<OnDiskAtom>public void remove()
remove in interface java.util.Iterator<OnDiskAtom>public void close()
throws java.io.IOException
OnDiskAtomIteratorclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface OnDiskAtomIteratorjava.io.IOExceptionCopyright © 2015 The Apache Software Foundation