Modifier and Type | Class and Description |
---|---|
static class |
MerkleTreeNodeCache.MerkleTreeNode
Represents a node in the merkle tree of files and symlinks.
|
static class |
MerkleTreeNodeCache.NodeData
NodeData is the
Protocol encoded data for a node. |
Constructor and Description |
---|
MerkleTreeNodeCache(Protocol protocol) |
Modifier and Type | Method and Description |
---|---|
MerkleTreeNodeCache.MerkleTreeNode |
createNode(Map<Path,Protocol.FileNode> files,
Map<Path,Protocol.SymlinkNode> symlinks,
Map<Path,Protocol.DirectoryNode> emptyDirectories)
Creates the full tree of nodes for the provided files, symlinks and empty directories and
returns the root node.
|
void |
forAllData(MerkleTreeNodeCache.MerkleTreeNode rootNode,
java.util.function.Consumer<MerkleTreeNodeCache.NodeData> dataConsumer)
Iterate over all the encoded data for the tree rooted at the provided node.
|
MerkleTreeNodeCache.NodeData |
getData(MerkleTreeNodeCache.MerkleTreeNode node)
Gets the
Protocol encoded data for the provided tree. |
MerkleTreeNodeCache.MerkleTreeNode |
mergeNodes(Collection<MerkleTreeNodeCache.MerkleTreeNode> nodes)
This will merge multiple merkle trees into one.
|
public MerkleTreeNodeCache(Protocol protocol)
public MerkleTreeNodeCache.MerkleTreeNode createNode(Map<Path,Protocol.FileNode> files, Map<Path,Protocol.SymlinkNode> symlinks, Map<Path,Protocol.DirectoryNode> emptyDirectories)
public MerkleTreeNodeCache.MerkleTreeNode mergeNodes(Collection<MerkleTreeNodeCache.MerkleTreeNode> nodes)
public void forAllData(MerkleTreeNodeCache.MerkleTreeNode rootNode, java.util.function.Consumer<MerkleTreeNodeCache.NodeData> dataConsumer)
public MerkleTreeNodeCache.NodeData getData(MerkleTreeNodeCache.MerkleTreeNode node)
Protocol
encoded data for the provided tree.