Class SortedTableVerifier.RangeOwnHelper
java.lang.Object
org.apache.cassandra.io.sstable.format.SortedTableVerifier.RangeOwnHelper
- Enclosing class:
- SortedTableVerifier<R extends SSTableReaderWithFilter>
Use the fact that check(...) is called with sorted tokens - we keep a pointer in to the normalized ranges
and only bump the pointer if the key given is out of range. This is done to avoid calling .contains(..) many
times for each key (with vnodes for example)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck(DecoratedKey key) check if the given key is contained in any of the given rangesvoidvalidate(DecoratedKey key) check if the given key is contained in any of the given ranges
-
Constructor Details
-
RangeOwnHelper
-
-
Method Details
-
validate
check if the given key is contained in any of the given rangesMust be called in sorted order - key should be increasing
- Parameters:
key- the key- Throws:
RuntimeException- if the key is not contained
-
check
check if the given key is contained in any of the given rangesMust be called in sorted order - key should be increasing
- Parameters:
key- the key- Returns:
- boolean
-