Class BranchBlockV1
java.lang.Object
io.datarouter.filesystem.snapshot.block.branch.BranchBlockV1
- All Implemented Interfaces:
Block,BranchBlock
public class BranchBlockV1 extends Object implements BranchBlock
Sections:
- level
- num keys
- key endings
- keys
- child block ids
-
Field Summary
Fields inherited from interface io.datarouter.filesystem.snapshot.block.branch.BranchBlock
LOG_COMPARISONS -
Constructor Summary
Constructors Constructor Description BranchBlockV1(byte[] bytes) -
Method Summary
Modifier and Type Method Description intchildBlock(int index)io.datarouter.scanner.Scanner<Integer>childBlockIds()BlockKeychildBranchBlockKey(SnapshotKey snapshotKey, int childBlockId)intheapSize()io.datarouter.model.util.Byteskey(int index)io.datarouter.scanner.Scanner<io.datarouter.model.util.Bytes>keys()BlockKeyleafBlockKey(SnapshotKey snapshotKey, int leafBlockId)intlevel()level 0 is a leaf index pointing at LeafBlocksintnumRecords()longrecordId(int index)StringtoDetailedString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.datarouter.filesystem.snapshot.block.branch.BranchBlock
findChildBlockIndex, findChildBlockIndex, keyCopies, lastKey, lastRecordId
-
Field Details
-
FORMAT
- See Also:
- Constant Field Values
-
-
Constructor Details
-
BranchBlockV1
public BranchBlockV1(byte[] bytes)
-
-
Method Details
-
heapSize
public int heapSize() -
level
public int level()Description copied from interface:BranchBlocklevel 0 is a leaf index pointing at LeafBlocks- Specified by:
levelin interfaceBranchBlock- Returns:
- level
-
numRecords
public int numRecords()- Specified by:
numRecordsin interfaceBranchBlock
-
recordId
public long recordId(int index)- Specified by:
recordIdin interfaceBranchBlock
-
key
public io.datarouter.model.util.Bytes key(int index)- Specified by:
keyin interfaceBranchBlock
-
keys
public io.datarouter.scanner.Scanner<io.datarouter.model.util.Bytes> keys()- Specified by:
keysin interfaceBranchBlock
-
childBlock
public int childBlock(int index)- Specified by:
childBlockin interfaceBranchBlock
-
childBlockIds
- Specified by:
childBlockIdsin interfaceBranchBlock
-
childBranchBlockKey
- Specified by:
childBranchBlockKeyin interfaceBranchBlock
-
leafBlockKey
- Specified by:
leafBlockKeyin interfaceBranchBlock
-
toDetailedString
- Specified by:
toDetailedStringin interfaceBranchBlock
-