Package org.apache.cassandra.db
Interface ClusteringBoundOrBoundary<V>
- All Superinterfaces:
Clusterable<V>,ClusteringPrefix<V>,IMeasurableMemory
- All Known Subinterfaces:
ClusteringBound<V>,ClusteringBoundary<V>
- All Known Implementing Classes:
ArrayClusteringBound,ArrayClusteringBoundary,ArrayClusteringBoundOrBoundary,BufferClusteringBound,BufferClusteringBoundary,BufferClusteringBoundOrBoundary
This class defines a threshold between ranges of clusterings. It can either be a start or end bound of a range, or
the boundary between two different defined ranges.
The latter is used for range tombstones for 2 main reasons: 1) When merging multiple iterators having range tombstones (that are represented by their start and end markers), we need to know when a range is close on an iterator, if it is reopened right away. Otherwise, we cannot easily produce the markers on the merged iterators within risking to fail the sorting guarantees of an iterator. See this comment for more details: https://goo.gl/yyB5mR. 2) This saves some storage space.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.cassandra.db.ClusteringPrefix
ClusteringPrefix.Deserializer, ClusteringPrefix.Kind -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault ClusteringBoundOrBoundary<ByteBuffer>clone(ByteBufferCloner cloner) invert()Returns the inverse of the current bound.default booleandefault booleanisClose(boolean reversed) default booleanisOpen(boolean reversed) default StringtoString(ClusteringComparator comparator) default StringtoString(TableMetadata metadata) Generates a proper string representation of the prefix.Methods inherited from interface org.apache.cassandra.db.Clusterable
clusteringMethods inherited from interface org.apache.cassandra.db.ClusteringPrefix
accessor, asEndBound, asStartBound, bufferAt, clusteringString, dataSize, digest, get, getBufferArray, getRawValues, isBottom, isEmpty, isTop, kind, retainable, serializeAsPartitionKey, size, stringAt, validate, validateMethods inherited from interface org.apache.cassandra.cache.IMeasurableMemory
unsharedHeapSize
-
Field Details
-
serializer
-
-
Method Details
-
isBoundary
default boolean isBoundary() -
isOpen
default boolean isOpen(boolean reversed) -
isClose
default boolean isClose(boolean reversed) -
clone
-
toString
Description copied from interface:ClusteringPrefixGenerates a proper string representation of the prefix.- Specified by:
toStringin interfaceClusteringPrefix<V>- Parameters:
metadata- the metadata for the table the clustering prefix is of.- Returns:
- a human-readable string representation fo this prefix.
-
toString
-
invert
ClusteringBoundOrBoundary<V> invert()Returns the inverse of the current bound.This invert both start into end (and vice-versa) and inclusive into exclusive (and vice-versa).
- Returns:
- the invert of this bound. For instance, if this bound is an exlusive start, this return an inclusive end with the same values.
-