| Package | Description |
|---|---|
| org.rocksdb |
The RocksDB Java driver
|
| Modifier and Type | Method and Description |
|---|---|
ReadOptions |
ReadOptions.setAutoPrefixMode(boolean mode)
When true, by default use total_order_seek = true, and RocksDB can
selectively enable prefix seek mode if won't generate a different result
from total_order_seek, based on seek key, and iterator upper bound.
|
ReadOptions |
ReadOptions.setBackgroundPurgeOnIteratorCleanup(boolean backgroundPurgeOnIteratorCleanup)
If true, when PurgeObsoleteFile is called in CleanupIteratorState, we
schedule a background job in the flush job queue and delete obsolete files
in background.
|
ReadOptions |
ReadOptions.setDeadline(long deadlineTime)
Deadline for completing an API call (Get/MultiGet/Seek/Next for now)
in microseconds.
|
ReadOptions |
ReadOptions.setFillCache(boolean fillCache)
Fill the cache when loading the block-based sst formatted db.
|
ReadOptions |
ReadOptions.setIgnoreRangeDeletions(boolean ignoreRangeDeletions)
If true, keys deleted using the DeleteRange() API will be visible to
readers until they are naturally deleted during compaction.
|
ReadOptions |
ReadOptions.setIoTimeout(long ioTimeout)
A timeout in microseconds to be passed to the underlying FileSystem for
reads.
|
ReadOptions |
ReadOptions.setIterateLowerBound(AbstractSlice<?> iterateLowerBound)
Defines the smallest key at which the backward
iterator can return an entry.
|
ReadOptions |
ReadOptions.setIterateUpperBound(AbstractSlice<?> iterateUpperBound)
Defines the extent up to which the forward iterator
can returns entries.
|
ReadOptions |
ReadOptions.setIterStartTs(AbstractSlice<?> iterStartTs)
Timestamp of operation.
|
ReadOptions |
ReadOptions.setManaged(boolean managed)
Deprecated.
This options is not used anymore.
|
ReadOptions |
ReadOptions.setMaxSkippableInternalKeys(long maxSkippableInternalKeys)
A threshold for the number of keys that can be skipped before failing an
iterator seek as incomplete.
|
ReadOptions |
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 |
ReadOptions.setPrefixSameAsStart(boolean prefixSameAsStart)
Enforce that the iterator only iterates over the same prefix as the seek.
|
ReadOptions |
ReadOptions.setReadaheadSize(long readaheadSize)
If non-zero, NewIterator will create a new table reader which
performs reads of the given size.
|
ReadOptions |
ReadOptions.setReadTier(ReadTier readTier)
Specify if this read request should process data that ALREADY
resides on a particular cache.
|
ReadOptions |
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 |
ReadOptions.setTableFilter(AbstractTableFilter tableFilter)
A callback to determine whether relevant keys for this scan exist in a
given table based on the table's properties.
|
ReadOptions |
ReadOptions.setTailing(boolean tailing)
Specify to create a tailing iterator -- a special iterator that has a
view of the complete database (i.e. it can also be used to read newly
added data) and is optimized for sequential reads.
|
ReadOptions |
ReadOptions.setTimestamp(AbstractSlice<?> timestamp)
Timestamp of operation.
|
ReadOptions |
ReadOptions.setTotalOrderSeek(boolean totalOrderSeek)
Enable a total order seek regardless of index format (e.g. hash index)
used in the table.
|
ReadOptions |
ReadOptions.setValueSizeSoftLimit(long valueSizeSoftLimit)
It limits the maximum cumulative value size of the keys in batch while
reading through MultiGet.
|
ReadOptions |
ReadOptions.setVerifyChecksums(boolean verifyChecksums)
If true, all data read from underlying storage will be
verified against corresponding checksums.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
RocksDB.get(ColumnFamilyHandle columnFamilyHandle,
ReadOptions opt,
byte[] key)
The simplified version of get which returns a new byte array storing
the value associated with the specified input key if any.
|
byte[] |
Transaction.get(ColumnFamilyHandle columnFamilyHandle,
ReadOptions readOptions,
byte[] key)
This function is similar to
RocksDB.get(ColumnFamilyHandle, ReadOptions, byte[]) except it will
also read pending changes in this transaction. |
int |
RocksDB.get(ColumnFamilyHandle columnFamilyHandle,
ReadOptions opt,
byte[] key,
byte[] value)
Get the value associated with the specified key within column family.
|
byte[] |
RocksDB.get(ColumnFamilyHandle columnFamilyHandle,
ReadOptions opt,
byte[] key,
int offset,
int len)
The simplified version of get which returns a new byte array storing
the value associated with the specified input key if any.
|
int |
RocksDB.get(ColumnFamilyHandle columnFamilyHandle,
ReadOptions opt,
byte[] key,
int offset,
int len,
byte[] value,
int vOffset,
int vLen)
Get the value associated with the specified key within column family.
|
int |
RocksDB.get(ColumnFamilyHandle columnFamilyHandle,
ReadOptions opt,
ByteBuffer key,
ByteBuffer value)
Get the value associated with the specified key within column family.
|
byte[] |
RocksDB.get(ReadOptions opt,
byte[] key)
The simplified version of get which returns a new byte array storing
the value associated with the specified input key if any.
|
byte[] |
Transaction.get(ReadOptions readOptions,
byte[] key)
This function is similar to
RocksDB.get(ReadOptions, byte[]) except it will
also read pending changes in this transaction. |
int |
RocksDB.get(ReadOptions opt,
byte[] key,
byte[] value)
Get the value associated with the specified key.
|
byte[] |
RocksDB.get(ReadOptions opt,
byte[] key,
int offset,
int len)
The simplified version of get which returns a new byte array storing
the value associated with the specified input key if any.
|
int |
RocksDB.get(ReadOptions opt,
byte[] key,
int offset,
int len,
byte[] value,
int vOffset,
int vLen)
Get the value associated with the specified key.
|
int |
RocksDB.get(ReadOptions opt,
ByteBuffer key,
ByteBuffer value)
Get the value associated with the specified key within column family.
|
byte[] |
Transaction.getForUpdate(ReadOptions readOptions,
byte[] key,
boolean exclusive)
Read this key and ensure that this transaction will only
be able to be committed if this key is not written outside this
transaction after it has first been read (or after the snapshot if a
snapshot is set in this transaction).
|
byte[] |
Transaction.getForUpdate(ReadOptions readOptions,
ColumnFamilyHandle columnFamilyHandle,
byte[] key,
boolean exclusive)
Same as
Transaction.getForUpdate(ReadOptions, ColumnFamilyHandle, byte[], boolean, boolean)
with doValidate=true. |
byte[] |
Transaction.getForUpdate(ReadOptions readOptions,
ColumnFamilyHandle columnFamilyHandle,
byte[] key,
boolean exclusive,
boolean doValidate)
Read this key and ensure that this transaction will only
be able to be committed if this key is not written outside this
transaction after it has first been read (or after the snapshot if a
snapshot is set in this transaction).
|
byte[] |
WriteBatchWithIndex.getFromBatchAndDB(RocksDB db,
ColumnFamilyHandle columnFamilyHandle,
ReadOptions options,
byte[] key)
Similar to
RocksDB.get(ColumnFamilyHandle, byte[]) but will also
read writes from this batch. |
byte[] |
WriteBatchWithIndex.getFromBatchAndDB(RocksDB db,
ReadOptions options,
byte[] key)
Similar to
RocksDB.get(byte[]) but will also
read writes from this batch. |
RocksIterator |
Transaction.getIterator(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.
|
RocksIterator |
Transaction.getIterator(ReadOptions readOptions,
ColumnFamilyHandle columnFamilyHandle)
Returns an iterator that will iterate on all keys in the column family
specified by
columnFamilyHandle including both keys in the DB
and uncommitted keys in this transaction. |
boolean |
RocksDB.keyMayExist(ColumnFamilyHandle columnFamilyHandle,
ReadOptions readOptions,
byte[] key,
Holder<byte[]> valueHolder)
If the key definitely does not exist in the database, then this method
returns false, otherwise it returns true if the key might exist.
|
boolean |
RocksDB.keyMayExist(ColumnFamilyHandle columnFamilyHandle,
ReadOptions readOptions,
byte[] key,
int offset,
int len,
Holder<byte[]> valueHolder)
If the key definitely does not exist in the database, then this method
returns false, otherwise it returns true if the key might exist.
|
boolean |
RocksDB.keyMayExist(ColumnFamilyHandle columnFamilyHandle,
ReadOptions readOptions,
ByteBuffer key)
If the key definitely does not exist in the database, then this method
returns false, otherwise it returns true if the key might exist.
|
KeyMayExist |
RocksDB.keyMayExist(ColumnFamilyHandle columnFamilyHandle,
ReadOptions readOptions,
ByteBuffer key,
ByteBuffer value)
If the key definitely does not exist in the database, then this method
returns
KeyMayExist.KeyMayExistEnum.kNotExist,
otherwise if it can with best effort retreive the value, it returns KeyMayExist.KeyMayExistEnum.kExistsWithValue otherwise it returns KeyMayExist.KeyMayExistEnum.kExistsWithoutValue. |
boolean |
RocksDB.keyMayExist(ReadOptions readOptions,
byte[] key,
Holder<byte[]> valueHolder)
If the key definitely does not exist in the database, then this method
returns false, otherwise it returns true if the key might exist.
|
boolean |
RocksDB.keyMayExist(ReadOptions readOptions,
byte[] key,
int offset,
int len,
Holder<byte[]> valueHolder)
If the key definitely does not exist in the database, then this method
returns false, otherwise it returns true if the key might exist.
|
boolean |
RocksDB.keyMayExist(ReadOptions readOptions,
ByteBuffer key)
If the key definitely does not exist in the database, then this method
returns false, otherwise it returns true if the key might exist.
|
KeyMayExist |
RocksDB.keyMayExist(ReadOptions readOptions,
ByteBuffer key,
ByteBuffer value)
If the key definitely does not exist in the database, then this method
returns
KeyMayExist.KeyMayExistEnum.kNotExist,
otherwise if it can with best effort retreive the value, it returns KeyMayExist.KeyMayExistEnum.kExistsWithValue otherwise it returns KeyMayExist.KeyMayExistEnum.kExistsWithoutValue. |
byte[][] |
Transaction.multiGet(ReadOptions readOptions,
byte[][] keys)
Deprecated.
|
byte[][] |
Transaction.multiGet(ReadOptions readOptions,
List<ColumnFamilyHandle> columnFamilyHandles,
byte[][] keys)
Deprecated.
|
List<byte[]> |
RocksDB.multiGetAsList(ReadOptions opt,
List<byte[]> keys)
Returns a list of values for the given list of keys.
|
List<byte[]> |
Transaction.multiGetAsList(ReadOptions readOptions,
List<byte[]> keys)
This function is similar to
RocksDB.multiGetAsList(java.util.List<byte[]>) except it will
also read pending changes in this transaction. |
List<byte[]> |
RocksDB.multiGetAsList(ReadOptions opt,
List<ColumnFamilyHandle> columnFamilyHandleList,
List<byte[]> keys)
Returns a list of values for the given list of keys.
|
List<byte[]> |
Transaction.multiGetAsList(ReadOptions readOptions,
List<ColumnFamilyHandle> columnFamilyHandles,
List<byte[]> keys)
This function is similar to
RocksDB.multiGetAsList(ReadOptions, List, List) except it will
also read pending changes in this transaction. |
List<ByteBufferGetStatus> |
RocksDB.multiGetByteBuffers(ReadOptions readOptions,
List<ByteBuffer> keys,
List<ByteBuffer> values)
Fetches a list of values for the given list of keys, all from the default column family.
|
List<ByteBufferGetStatus> |
RocksDB.multiGetByteBuffers(ReadOptions readOptions,
List<ColumnFamilyHandle> columnFamilyHandleList,
List<ByteBuffer> keys,
List<ByteBuffer> values)
Fetches a list of values for the given list of keys.
|
byte[][] |
Transaction.multiGetForUpdate(ReadOptions readOptions,
byte[][] keys)
Deprecated.
|
byte[][] |
Transaction.multiGetForUpdate(ReadOptions readOptions,
List<ColumnFamilyHandle> columnFamilyHandles,
byte[][] keys)
Deprecated.
|
List<byte[]> |
Transaction.multiGetForUpdateAsList(ReadOptions readOptions,
List<byte[]> keys)
A multi-key version of
Transaction.getForUpdate(ReadOptions, byte[], boolean). |
List<byte[]> |
Transaction.multiGetForUpdateAsList(ReadOptions readOptions,
List<ColumnFamilyHandle> columnFamilyHandles,
List<byte[]> keys)
A multi-key version of
Transaction.getForUpdate(ReadOptions, ColumnFamilyHandle, byte[], boolean). |
RocksIterator |
RocksDB.newIterator(ColumnFamilyHandle columnFamilyHandle,
ReadOptions readOptions)
Return a heap-allocated iterator over the contents of a
ColumnFamily.
|
RocksIterator |
RocksDB.newIterator(ReadOptions readOptions)
Return a heap-allocated iterator over the contents of the
database.
|
SstFileReaderIterator |
SstFileReader.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.
|
List<RocksIterator> |
RocksDB.newIterators(List<ColumnFamilyHandle> columnFamilyHandleList,
ReadOptions readOptions)
Returns iterators from a consistent database state across multiple
column families.
|
RocksIterator |
WriteBatchWithIndex.newIteratorWithBase(ColumnFamilyHandle columnFamilyHandle,
RocksIterator baseIterator,
ReadOptions readOptions)
Provides Read-Your-Own-Writes like functionality by
creating a new Iterator that will use
WBWIRocksIterator
as a delta and baseIterator as a base
Updating write batch with the current key of the iterator is not safe. |
RocksIterator |
WriteBatchWithIndex.newIteratorWithBase(RocksIterator baseIterator,
ReadOptions readOptions)
Provides Read-Your-Own-Writes like functionality by
creating a new Iterator that will use
WBWIRocksIterator
as a delta and baseIterator as a base. |
| Constructor and Description |
|---|
ReadOptions(ReadOptions other)
Copy constructor.
|
Copyright © 2022. All rights reserved.