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.
RocksObject
nativeHandle_
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.
|
byte[] |
value()
Return the value for the current entry.
|
disposeInternal, isValid, next, prev, seek, seekToFirst, seekToLast, status
close, disOwnNativeHandle, isOwningHandle
dispose, finalize
protected 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 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()
protected final void disposeInternal(long handle)
disposeInternal
in class RocksObject