Class SnapshotFileWriter
java.lang.Object
io.datarouter.filesystem.snapshot.writer.SnapshotFileWriter
public class SnapshotFileWriter extends Object
-
Field Summary
Fields Modifier and Type Field Description Map<Integer,BlockQueue>branchBlockQueueByLevelBlockQueueleafBlockQueueList<BlockQueue>valueBlockQueueByColumn -
Constructor Summary
Constructors Constructor Description SnapshotFileWriter(SnapshotWriterTracker tracker, SnapshotFileStorage snapshotFileStorage, SnapshotWriterConfig config, Consumer<Void> onValueFileWriteCallback, Consumer<Void> onLeafFileWriteCallback, Consumer<Integer> onBranchFileWriteCallback) -
Method Summary
Modifier and Type Method Description voidaddBranchBlock(int level, int blockId, CompressedBlock block)voidaddLeafBlock(int blockId, CompressedBlock block)voidaddValueBlock(int column, int blockId, CompressedBlock block)BlockQueue.FileIdsAndEndingsbranchFileInfo(int level, int firstBlockId, int numBlocks)booleanbranchFileInfoReady(int level, int firstBlockId, int numBlocks)voidcompleteBranches(int level)voidcompleteLeaves()voidcompleteValues()BlockQueue.FileIdsAndEndingsleafFileInfo(int firstBlockId, int numBlocks)booleanleafFileInfoReady(int firstBlockId, int numBlocks)voidlogQueueStats()introotBranchEnding()BlockQueue.FileIdsAndEndingsvalueFileInfo(int column, int firstBlockId, int numBlocks)booleanvalueFileInfoReady(int column, int firstBlockId, int numBlocks)
-
Field Details
-
Constructor Details
-
SnapshotFileWriter
public SnapshotFileWriter(SnapshotWriterTracker tracker, SnapshotFileStorage snapshotFileStorage, SnapshotWriterConfig config, Consumer<Void> onValueFileWriteCallback, Consumer<Void> onLeafFileWriteCallback, Consumer<Integer> onBranchFileWriteCallback)
-
-
Method Details
-
addBranchBlock
-
completeBranches
public void completeBranches(int level) -
addLeafBlock
-
completeLeaves
public void completeLeaves() -
addValueBlock
-
completeValues
public void completeValues() -
logQueueStats
public void logQueueStats() -
valueFileInfoReady
public boolean valueFileInfoReady(int column, int firstBlockId, int numBlocks) -
valueFileInfo
-
leafFileInfoReady
public boolean leafFileInfoReady(int firstBlockId, int numBlocks) -
leafFileInfo
-
branchFileInfoReady
public boolean branchFileInfoReady(int level, int firstBlockId, int numBlocks) -
branchFileInfo
-
rootBranchEnding
public int rootBranchEnding()
-