Class AbstractSSTableIterator.AbstractReader

    • Constructor Detail

      • AbstractReader

        protected AbstractReader​(FileDataInput file,
                                 boolean shouldCloseFile)
    • Method Detail

      • seekToPosition

        public void seekToPosition​(long position)
                            throws java.io.IOException
        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 its UnfilteredDeserializer.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:
        seekToPosition in interface AbstractSSTableIterator.Reader
        Throws:
        java.io.IOException
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<Unfiltered>
      • hasNextInternal

        protected abstract boolean hasNextInternal()
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • nextInternal

        protected abstract Unfiltered nextInternal()
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object