Package org.yamcs.yarch.rocksdb
Class RdbTableWalker
- java.lang.Object
-
- org.yamcs.yarch.AbstractTableWalker
-
- org.yamcs.yarch.rocksdb.RdbTableWalker
-
- All Implemented Interfaces:
TableWalker
public class RdbTableWalker extends AbstractTableWalker
-
-
Field Summary
Fields Modifier and Type Field Description protected TableVisitor
visitor
-
Fields inherited from class org.yamcs.yarch.AbstractTableWalker
ascending, follow, log, numRecordsRead, running, tableDefinition
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RdbTableWalker(Tablespace tablespace, YarchDatabaseInstance ydb, TableDefinition tableDefinition, boolean ascending, boolean follow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getNumRecordsRead()
void
setBatchUpdates(boolean batchUpdates)
void
setSnapshot(org.rocksdb.Snapshot snapshot)
If set, the snapshot will be used to iterate the database but only if the follow = falseprotected boolean
walkInterval(PartitionManager.Interval interval, DbRange tableRange, TableVisitor visitor)
Iterate data through the given interval taking into account also the tableRange.-
Methods inherited from class org.yamcs.yarch.AbstractTableWalker
close, iAscendingFinished, isDescendingFinished, isRunning, setPartitionFilter, setPrimaryIndexRange, walk
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.yamcs.yarch.TableWalker
setSecondaryIndexRange
-
-
-
-
Field Detail
-
visitor
protected TableVisitor visitor
-
-
Constructor Detail
-
RdbTableWalker
protected RdbTableWalker(Tablespace tablespace, YarchDatabaseInstance ydb, TableDefinition tableDefinition, boolean ascending, boolean follow)
-
-
Method Detail
-
walkInterval
protected boolean walkInterval(PartitionManager.Interval interval, DbRange tableRange, TableVisitor visitor) throws YarchException
Iterate data through the given interval taking into account also the tableRange.tableRange has to be non-null but can be unbounded at one or both ends.
- Specified by:
walkInterval
in classAbstractTableWalker
- Returns:
- returns true if the end condition has been reached.
- Throws:
YarchException
-
setSnapshot
public void setSnapshot(org.rocksdb.Snapshot snapshot)
If set, the snapshot will be used to iterate the database but only if the follow = falseThe snapshot will be release at the end
- Parameters:
snapshot
-
-
setBatchUpdates
public void setBatchUpdates(boolean batchUpdates)
-
getNumRecordsRead
public long getNumRecordsRead()
-
-