Package org.yamcs.yarch.rocksdb
Class SecondaryIndexTableWalker
- java.lang.Object
-
- org.yamcs.yarch.rocksdb.SecondaryIndexTableWalker
-
- All Implemented Interfaces:
TableWalker
public class SecondaryIndexTableWalker extends Object implements TableWalker
iterates through a table based on the secondary index range.The Rocksdb key of the secondary index is formed by
- tbsIndex
- secondary key
- primary key
-
-
Field Summary
Fields Modifier and Type Field Description protected TableVisitor
visitor
-
Constructor Summary
Constructors Modifier Constructor Description protected
SecondaryIndexTableWalker(Tablespace tablespace, RdbTable table, boolean ascending, boolean follow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
setPrimaryIndexRange(DbRange pkRange)
void
setSecondaryIndexRange(DbRange skRange)
void
walk(TableVisitor visitor)
Iterate data through the given interval taking into account also the tableRange.-
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
setPartitionFilter
-
-
-
-
Field Detail
-
visitor
protected TableVisitor visitor
-
-
Constructor Detail
-
SecondaryIndexTableWalker
protected SecondaryIndexTableWalker(Tablespace tablespace, RdbTable table, boolean ascending, boolean follow)
-
-
Method Detail
-
walk
public void walk(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:
walk
in interfaceTableWalker
- Throws:
YarchException
-
setPrimaryIndexRange
public void setPrimaryIndexRange(DbRange pkRange)
- Specified by:
setPrimaryIndexRange
in interfaceTableWalker
-
setSecondaryIndexRange
public void setSecondaryIndexRange(DbRange skRange)
- Specified by:
setSecondaryIndexRange
in interfaceTableWalker
-
close
public void close()
- Specified by:
close
in interfaceTableWalker
-
-