Package org.rocksdb
Class SstFileReader
- java.lang.Object
-
- org.rocksdb.AbstractNativeReference
-
- org.rocksdb.AbstractImmutableNativeReference
-
- org.rocksdb.RocksObject
-
- org.rocksdb.SstFileReader
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class SstFileReader extends RocksObject
-
-
Field Summary
-
Fields inherited from class org.rocksdb.RocksObject
nativeHandle_
-
Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_
-
-
Constructor Summary
Constructors Constructor Description SstFileReader(Options options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddisposeInternal(long handle)TablePropertiesgetTableProperties()Get the properties of the table.SstFileReaderIteratornewIterator(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.voidopen(java.lang.String filePath)Prepare SstFileReader to read a file.voidverifyChecksum()Verify checksum-
Methods inherited from class org.rocksdb.RocksObject
disposeInternal, getNativeHandle
-
Methods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Methods inherited from class org.rocksdb.AbstractNativeReference
dispose, finalize
-
-
-
-
Constructor Detail
-
SstFileReader
public SstFileReader(Options options)
-
-
Method Detail
-
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. SettingReadOptions.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(java.lang.String filePath) throws RocksDBExceptionPrepare 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 RocksDBExceptionVerify 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:
disposeInternalin classRocksObject
-
-