Package org.rocksdb

Class SstFileReader

All Implemented Interfaces:
AutoCloseable

public class SstFileReader extends RocksObject
  • Constructor Details

    • SstFileReader

      public SstFileReader(Options options)
  • Method Details

    • newIterator

      public SstFileReaderIterator newIterator(ReadOptions readOptions)
      Returns an iterator that will iterate on all keys in the default column family including both keys in the DB and uncommitted keys in this transaction.

      Setting ReadOptions.setSnapshot(Snapshot) will affect what is read from the DB but will NOT change which keys are read from this transaction (the keys in this transaction do not yet belong to any snapshot and will be fetched regardless).

      Caller is responsible for deleting the returned Iterator.

      Parameters:
      readOptions - Read options.
      Returns:
      instance of iterator object.
    • open

      public void open(String filePath) throws RocksDBException
      Prepare SstFileReader to read a file.
      Parameters:
      filePath - the location of file
      Throws:
      RocksDBException - thrown if error happens in underlying native library.
    • verifyChecksum

      public void verifyChecksum() throws RocksDBException
      Verify checksum
      Throws:
      RocksDBException - if the checksum is not valid
    • getTableProperties

      public TableProperties getTableProperties() throws RocksDBException
      Get the properties of the table.
      Returns:
      the properties
      Throws:
      RocksDBException - if an error occurs whilst getting the table properties
    • disposeInternal

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