public interface ClusteringPrefix extends IMeasurableMemory, Clusterable
ClusteringComparator can compare.
It holds values for the clustering columns of a table (potentially only a prefix of all of them) and has a "kind" that allows us to implement slices with inclusive and exclusive bounds.
In practice, ClusteringPrefix is just the common parts to its 3 main subtype: Clustering and
Slice.Bound/RangeTombstone.Bound, where:
1) Clustering represents the clustering values for a row, i.e. the values for it's clustering columns.
2) Slice.Bound represents a bound (start or end) of a slice (of rows).
3) RangeTombstoneBoundMarker.Bound represents a range tombstone marker "bound".
See those classes for more details.
| Modifier and Type | Interface and Description |
|---|---|
static class |
ClusteringPrefix.Deserializer
Helper class that makes the deserialization of clustering prefixes faster.
|
static class |
ClusteringPrefix.Kind
The kind of clustering prefix this actually is.
|
static class |
ClusteringPrefix.Serializer |
| Modifier and Type | Field and Description |
|---|---|
static ClusteringPrefix.Serializer |
serializer |
| Modifier and Type | Method and Description |
|---|---|
int |
dataSize()
The size of the data hold by this prefix.
|
void |
digest(java.security.MessageDigest digest)
Adds the data of this clustering prefix to the provided digest.
|
java.nio.ByteBuffer |
get(int i)
Retrieves the ith value of this prefix.
|
java.nio.ByteBuffer[] |
getRawValues()
The values of this prefix as an array.
|
ClusteringPrefix.Kind |
kind() |
int |
size()
The number of values in this prefix.
|
java.lang.String |
toString(CFMetaData metadata)
Generates a proper string representation of the prefix.
|
unsharedHeapSizeclusteringstatic final ClusteringPrefix.Serializer serializer
ClusteringPrefix.Kind kind()
int size()
java.nio.ByteBuffer get(int i)
i - the index of the value to retrieve. Must be such that 0 <= i < size().null.void digest(java.security.MessageDigest digest)
digest - the digest to which to add this prefix.int dataSize()
java.lang.String toString(CFMetaData metadata)
metadata - the metadata for the table the clustering prefix is of.java.nio.ByteBuffer[] getRawValues()
Please note that this may or may not require an array creation. So 1) you should *not*
modify the returned array and 2) it's more efficient to use size() and
get(int) unless you actually need an array.
Copyright © 2016 The Apache Software Foundation