Search in sources :

Example 1 with SnapshotLeafSearchResult

use of io.datarouter.filesystem.snapshot.reader.record.SnapshotLeafSearchResult in project datarouter by hotpads.

the class ScanningSnapshotReader method scanLeafRecords.

public Scanner<SnapshotLeafRecord> scanLeafRecords(byte[] startKey, boolean inclusive) {
    var keyReader = new SnapshotKeyReader(snapshotKey, blockLoader);
    LeafBlock leafBlock = keyReader.leafBlock(startKey);
    SnapshotLeafSearchResult searchResult = leafBlock.search(startKey);
    long fromRecordIdInclusive = searchResult.recordId(inclusive);
    return scanLeafRecords(fromRecordIdInclusive);
}
Also used : LeafBlock(io.datarouter.filesystem.snapshot.block.leaf.LeafBlock) SnapshotLeafSearchResult(io.datarouter.filesystem.snapshot.reader.record.SnapshotLeafSearchResult)

Aggregations

LeafBlock (io.datarouter.filesystem.snapshot.block.leaf.LeafBlock)1 SnapshotLeafSearchResult (io.datarouter.filesystem.snapshot.reader.record.SnapshotLeafSearchResult)1