public class TransactionLogIterator extends RocksObject
A TransactionLogIterator is used to iterate over the transactions in a db. One run of the iterator is continuous, i.e. the iterator will stop at the beginning of any gap in sequences.
| Modifier and Type | Class and Description |
|---|---|
class |
TransactionLogIterator.BatchResult
BatchResult represents a data structure returned
by a TransactionLogIterator containing a sequence
number and a
WriteBatch instance. |
nativeHandle_| Modifier and Type | Method and Description |
|---|---|
protected void |
disposeInternal()
The helper function of
dispose() which all subclasses of
RocksObject must implement to release their associated
C++ resource. |
TransactionLogIterator.BatchResult |
getBatch()
If iterator position is valid, return the current
write_batch and the sequence number of the earliest
transaction contained in the batch.
|
boolean |
isValid()
An iterator is either positioned at a WriteBatch
or not valid.
|
void |
next()
Moves the iterator to the next WriteBatch.
|
void |
status()
Throws RocksDBException if something went wrong.
|
disOwnNativeHandle, dispose, finalize, isInitialized, isOwningNativeHandlepublic boolean isValid()
An iterator is either positioned at a WriteBatch or not valid. This method returns true if the iterator is valid. Can read data from a valid iterator.
public void next()
Moves the iterator to the next WriteBatch. REQUIRES: Valid() to be true.
public void status()
throws RocksDBException
Throws RocksDBException if something went wrong.
RocksDBException - if something went
wrong in the underlying C++ code.public TransactionLogIterator.BatchResult getBatch()
If iterator position is valid, return the current write_batch and the sequence number of the earliest transaction contained in the batch.
ONLY use if Valid() is true and status() is OK.
TransactionLogIterator.BatchResult
instance.protected void disposeInternal()
RocksObjectdispose() which all subclasses of
RocksObject must implement to release their associated
C++ resource.disposeInternal in class RocksObject