Class MerkleTree
- java.lang.Object
-
- org.apache.accumulo.test.replication.merkle.MerkleTree
-
public class MerkleTree extends Object
Simple implementation of a Merkle tree
-
-
Field Summary
Fields Modifier and Type Field Description protected String
digestAlgorithm
protected List<MerkleTreeNode>
leaves
-
Constructor Summary
Constructors Constructor Description MerkleTree(List<MerkleTreeNode> leaves, String digestAlgorithm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Pair<Integer,Integer>
findNextPair(List<MerkleTreeNode> nodes)
MerkleTreeNode
getRootNode()
-
-
-
Field Detail
-
leaves
protected List<MerkleTreeNode> leaves
-
digestAlgorithm
protected String digestAlgorithm
-
-
Constructor Detail
-
MerkleTree
public MerkleTree(List<MerkleTreeNode> leaves, String digestAlgorithm)
-
-
Method Detail
-
getRootNode
public MerkleTreeNode getRootNode() throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
-
findNextPair
protected Pair<Integer,Integer> findNextPair(List<MerkleTreeNode> nodes)
-
-