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 TableVisitorvisitor-
Fields inherited from class org.yamcs.yarch.AbstractTableWalker
ascending, follow, log, numRecordsRead, running, tableDefinition
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRdbTableWalker(Tablespace tablespace, YarchDatabaseInstance ydb, TableDefinition tableDefinition, boolean ascending, boolean follow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetNumRecordsRead()booleanisBatchUpdates()voidsetBatchUpdates(boolean batchUpdates)voidsetSnapshot(org.rocksdb.Snapshot snapshot)If set, the snapshot will be used to iterate the database but only if the follow = falseprotected booleanwalkInterval(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, StreamSqlException
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:
walkIntervalin classAbstractTableWalker- Returns:
- returns true if the end condition has been reached.
- Throws:
StreamSqlExceptionYarchException
-
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-
-
getNumRecordsRead
public long getNumRecordsRead()
-
isBatchUpdates
public boolean isBatchUpdates()
-
setBatchUpdates
public void setBatchUpdates(boolean batchUpdates)
-
-