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
public interface ClusteringBoundOrBoundary<V> extends ClusteringPrefix<V>
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 Classes Modifier and Type Interface Description static class
ClusteringBoundOrBoundary.Serializer
-
Nested classes/interfaces inherited from interface org.apache.cassandra.db.ClusteringPrefix
ClusteringPrefix.Deserializer, ClusteringPrefix.Kind
-
-
Field Summary
Fields Modifier and Type Field Description static ClusteringBoundOrBoundary.Serializer
serializer
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ClusteringBoundOrBoundary<java.nio.ByteBuffer>
clone(ByteBufferCloner cloner)
ClusteringBoundOrBoundary<V>
invert()
Returns the inverse of the current bound.default boolean
isBoundary()
default boolean
isClose(boolean reversed)
default boolean
isOpen(boolean reversed)
default java.lang.String
toString(ClusteringComparator comparator)
default java.lang.String
toString(TableMetadata metadata)
Generates a proper string representation of the prefix.-
Methods inherited from interface org.apache.cassandra.db.Clusterable
clustering
-
Methods 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, validate
-
Methods inherited from interface org.apache.cassandra.cache.IMeasurableMemory
unsharedHeapSize
-
-
-
-
Field Detail
-
serializer
static final ClusteringBoundOrBoundary.Serializer serializer
-
-
Method Detail
-
isBoundary
default boolean isBoundary()
-
isOpen
default boolean isOpen(boolean reversed)
-
isClose
default boolean isClose(boolean reversed)
-
clone
default ClusteringBoundOrBoundary<java.nio.ByteBuffer> clone(ByteBufferCloner cloner)
-
toString
default java.lang.String toString(TableMetadata metadata)
Description copied from interface:ClusteringPrefix
Generates a proper string representation of the prefix.- Specified by:
toString
in interfaceClusteringPrefix<V>
- Parameters:
metadata
- the metadata for the table the clustering prefix is of.- Returns:
- a human-readable string representation fo this prefix.
-
toString
default java.lang.String toString(ClusteringComparator comparator)
-
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.
-
-