public class ReadOptions extends RocksObject
nativeHandle_
Constructor and Description |
---|
ReadOptions() |
Modifier and Type | Method and Description |
---|---|
protected void |
disposeInternal(long handle) |
boolean |
fillCache()
Fill the cache when loading the block-based sst formated db.
|
boolean |
managed()
Returns whether managed iterators will be used.
|
boolean |
pinData()
Returns whether the blocks loaded by the iterator will be pinned in memory
|
boolean |
prefixSameAsStart()
Returns whether the iterator only iterates over the same prefix as the seek
|
ReadTier |
readTier()
Returns the current read tier.
|
ReadOptions |
setFillCache(boolean fillCache)
Fill the cache when loading the block-based sst formatted db.
|
ReadOptions |
setManaged(boolean managed)
Specify to create a managed iterator -- a special iterator that
uses less resources by having the ability to free its underlying
resources on request.
|
ReadOptions |
setPinData(boolean pinData)
Keep the blocks loaded by the iterator pinned in memory as long as the
iterator is not deleted, If used when reading from tables created with
BlockBasedTableOptions::use_delta_encoding = false,
Iterator's property "rocksdb.iterator.is-key-pinned" is guaranteed to
return 1.
|
ReadOptions |
setPrefixSameAsStart(boolean prefixSameAsStart)
Enforce that the iterator only iterates over the same prefix as the seek.
|
ReadOptions |
setReadTier(ReadTier readTier)
Specify if this read request should process data that ALREADY
resides on a particular cache.
|
ReadOptions |
setSnapshot(Snapshot snapshot)
If "snapshot" is non-nullptr, read as of the supplied snapshot
(which must belong to the DB that is being read and which must
not have been released).
|
ReadOptions |
setTailing(boolean tailing)
Specify to create a tailing iterator -- a special iterator that has a
view of the complete database (i.e.
|
ReadOptions |
setTotalOrderSeek(boolean totalOrderSeek)
Enable a total order seek regardless of index format (e.g.
|
ReadOptions |
setVerifyChecksums(boolean verifyChecksums)
If true, all data read from underlying storage will be
verified against corresponding checksums.
|
Snapshot |
snapshot()
Returns the currently assigned Snapshot instance.
|
boolean |
tailing()
Specify to create a tailing iterator -- a special iterator that has a
view of the complete database (i.e.
|
boolean |
totalOrderSeek()
Returns whether a total seek order will be used
|
boolean |
verifyChecksums()
If true, all data read from underlying storage will be
verified against corresponding checksums.
|
disposeInternal
close, disOwnNativeHandle, isOwningHandle
dispose, finalize
public boolean verifyChecksums()
public ReadOptions setVerifyChecksums(boolean verifyChecksums)
verifyChecksums
- if true, then checksum verification
will be performed on every read.public boolean fillCache()
public ReadOptions setFillCache(boolean fillCache)
fillCache
- if true, then fill-cache behavior will be
performed.public Snapshot snapshot()
public ReadOptions setSnapshot(Snapshot snapshot)
If "snapshot" is non-nullptr, read as of the supplied snapshot (which must belong to the DB that is being read and which must not have been released). If "snapshot" is nullptr, use an implicit snapshot of the state at the beginning of this read operation.
Default: null
snapshot
- Snapshot
instancepublic ReadTier readTier()
ReadTier.READ_ALL_TIER
public ReadOptions setReadTier(ReadTier readTier)
RocksDBException
is thrown.readTier
- ReadTier
instancepublic boolean tailing()
ROCKSDB_LITE
mode!public ReadOptions setTailing(boolean tailing)
tailing
- if true, then tailing iterator will be enabled.public boolean managed()
public ReadOptions setManaged(boolean managed)
managed
- if true, then managed iterators will be enabled.public boolean totalOrderSeek()
public ReadOptions setTotalOrderSeek(boolean totalOrderSeek)
totalOrderSeek
- if true, then total order seek will be enabled.public boolean prefixSameAsStart()
public ReadOptions setPrefixSameAsStart(boolean prefixSameAsStart)
totalOrderSeek()
is false.
Unlike iterate_upper_bound, setPrefixSameAsStart(boolean)
only
works within a prefix but in both directions.prefixSameAsStart
- if true, then the iterator only iterates over the
same prefix as the seekpublic boolean pinData()
public ReadOptions setPinData(boolean pinData)
pinData
- if true, the blocks loaded by the iterator will be pinnedprotected final void disposeInternal(long handle)
disposeInternal
in class RocksObject