public class RocksIterator extends AbstractRocksIterator<RocksDB>
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.
RocksObjectnativeHandle_owningHandle_| Modifier | Constructor and Description |
|---|---|
protected |
RocksIterator(RocksDB rocksDB,
long nativeHandle) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
disposeInternal(long handle) |
byte[] |
key()
Return the key for the current entry.
|
int |
key(ByteBuffer key)
Return the key for the current entry.
|
byte[] |
value()
Return the value for the current entry.
|
int |
value(ByteBuffer value)
Return the value for the current entry.
|
disposeInternal, isValid, next, prev, refresh, seek, seek, seekForPrev, seekForPrev, seekToFirst, seekToLast, statusgetNativeHandleclose, disOwnNativeHandle, isOwningHandleprotected RocksIterator(RocksDB rocksDB, long nativeHandle)
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()
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()
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.key, then it indicates that the size of the
input buffer key is insufficient and partial result will
be returned.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()
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()
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.value, then it indicates that the size of the
input buffer value is insufficient and partial result will
be returned.protected final void disposeInternal(long handle)
disposeInternal in class RocksObjectCopyright © 2022. All rights reserved.