Package org.apache.cassandra.io.sstable
Class AbstractSSTableIterator.AbstractReader
java.lang.Object
org.apache.cassandra.io.sstable.AbstractSSTableIterator.AbstractReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<Unfiltered>,AbstractSSTableIterator.Reader
- Direct Known Subclasses:
AbstractSSTableIterator.ForwardReader
- Enclosing class:
- AbstractSSTableIterator<RIE extends AbstractRowIndexEntry>
public abstract class AbstractSSTableIterator.AbstractReader
extends Object
implements AbstractSSTableIterator.Reader
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractReader(FileDataInput file, boolean shouldCloseFile) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanhasNext()protected abstract booleannext()protected abstract UnfilteredvoidseekToPosition(long position) Seek to the given position in the file.abstract voidsetForSlice(Slice slice) toString()protected voidupdateOpenMarker(RangeTombstoneMarker marker) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Field Details
-
file
-
deserializer
-
openMarker
-
-
Constructor Details
-
AbstractReader
-
-
Method Details
-
seekToPosition
Seek to the given position in the file. Initializes the file reader along with a deserializer if they are not initialized yet. Otherwise, the deserializer is reset by calling itsUnfilteredDeserializer.clearState()method. Note that the only valid usage of this method is to seek to the beginning of the serialized record so that the deserializer can read the next unfiltered from that position. Setting an arbitrary position will lead to unexpected results and/or corrupted reads.- Specified by:
seekToPositionin interfaceAbstractSSTableIterator.Reader- Throws:
IOException
-
updateOpenMarker
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<Unfiltered>
-
next
- Specified by:
nextin interfaceIterator<Unfiltered>
-
setForSlice
- Specified by:
setForSlicein interfaceAbstractSSTableIterator.Reader- Throws:
IOException
-
hasNextInternal
- Throws:
IOException
-
nextInternal
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
toString
-