Package org.rocksdb

Class SstFileReaderIterator

All Implemented Interfaces:
AutoCloseable, RocksIteratorInterface

public class SstFileReaderIterator extends AbstractRocksIterator<SstFileReader>

An iterator that yields a sequence of key/value pairs from a source. Multiple implementations are provided by this library. In particular, iterators are provided to access the contents of a Table or a DB.

Multiple threads can invoke const methods on an RocksIterator without external synchronization, but if any of the threads may call a non-const method, all threads accessing the same RocksIterator must use external synchronization.

See Also:
  • Constructor Details

    • SstFileReaderIterator

      protected SstFileReaderIterator(SstFileReader reader, long nativeHandle)
  • Method Details

    • key

      public byte[] key()

      Return the key for the current entry. The underlying storage for the returned slice is valid only until the next modification of the iterator.

      REQUIRES: AbstractRocksIterator.isValid()

      Returns:
      key for the current entry.
    • key

      public int key(ByteBuffer key)

      Return the key for the current entry. The underlying storage for the returned slice is valid only until the next modification of the iterator.

      REQUIRES: AbstractRocksIterator.isValid()

      Parameters:
      key - the out-value to receive the retrieved key. It is using position and limit. Limit is set according to key size. Supports direct buffer only.
      Returns:
      The size of the actual key. If the return key is greater than the length of key, then it indicates that the size of the input buffer key is insufficient and partial result will be returned.
    • value

      public byte[] value()

      Return the value for the current entry. The underlying storage for the returned slice is valid only until the next modification of the iterator.

      REQUIRES: !AtEnd() && !AtStart()

      Returns:
      value for the current entry.
    • value

      public int value(ByteBuffer value)

      Return the value for the current entry. The underlying storage for the returned slice is valid only until the next modification of the iterator.

      REQUIRES: AbstractRocksIterator.isValid()

      Parameters:
      value - the out-value to receive the retrieved value. It is using position and limit. Limit is set according to value size. Supports direct buffer only.
      Returns:
      The size of the actual value. If the return value is greater than the length of value, then it indicates that the size of the input buffer value is insufficient and partial result will be returned.
    • disposeInternal

      protected final void disposeInternal(long handle)
      Specified by:
      disposeInternal in class RocksObject