org.apache.cassandra.utils
Class MerkleTree.TreeRange
java.lang.Object
org.apache.cassandra.dht.Range
org.apache.cassandra.utils.MerkleTree.TreeRange
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Range>
- Enclosing class:
- MerkleTree
public static class MerkleTree.TreeRange
- extends Range
The public interface to a range in the tree.
NB: A TreeRange should not be returned by a public method unless the
parents of the range it represents are already invalidated, since it
will allow someone to modify the hash. Alternatively, a TreeRange
may be created with a null tree, indicating that it is read only.
- See Also:
- Serialized Form
Method Summary |
byte[] |
hash()
|
void |
hash(byte[] hash)
|
java.lang.String |
toString()
|
void |
validate(java.util.Collection<MerkleTree.RowHash> entries)
Consumes a collection of entries within this range. |
void |
validate(com.google.common.collect.PeekingIterator<MerkleTree.RowHash> entries)
Consumes an iterator over entries within this range, setting the
value of this range's Leaf to the computed value. |
Methods inherited from class org.apache.cassandra.dht.Range |
compareTo, contains, contains, contains, equals, hashCode, intersects, isTokenInRanges, isWrapAround, left, right, serializer |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
depth
public final byte depth
hashable
public final org.apache.cassandra.utils.MerkleTree.Hashable hashable
hash
public void hash(byte[] hash)
hash
public byte[] hash()
validate
public void validate(java.util.Collection<MerkleTree.RowHash> entries)
- Consumes a collection of entries within this range.
validate
public void validate(com.google.common.collect.PeekingIterator<MerkleTree.RowHash> entries)
- Consumes an iterator over entries within this range, setting the
value of this range's Leaf to the computed value.
toString
public java.lang.String toString()
- Overrides:
toString
in class Range
Copyright © 2009 The Apache Software Foundation