Package org.apache.cassandra.db
Class BufferClustering
- java.lang.Object
-
- org.apache.cassandra.db.AbstractOnHeapClusteringPrefix<java.nio.ByteBuffer>
-
- org.apache.cassandra.db.AbstractBufferClusteringPrefix
-
- org.apache.cassandra.db.BufferClustering
-
- All Implemented Interfaces:
IMeasurableMemory
,Clusterable<java.nio.ByteBuffer>
,Clustering<java.nio.ByteBuffer>
,ClusteringPrefix<java.nio.ByteBuffer>
public class BufferClustering extends AbstractBufferClusteringPrefix implements Clustering<java.nio.ByteBuffer>
The clustering column values for a row.A
Clustering
is aClusteringPrefix
that must always be "complete", i.e. have as many values as there is clustering columns in the table it is part of. It is the clustering prefix used by rows.Note however that while it's size must be equal to the table clustering size, a clustering can have
null
values (this is currently only allowed in COMPACT table for historical reasons, but we could imagine lifting that limitation if we decide it make sense from a CQL point of view).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.db.Clustering
Clustering.Serializer
-
Nested classes/interfaces inherited from interface org.apache.cassandra.db.ClusteringPrefix
ClusteringPrefix.Deserializer, ClusteringPrefix.Kind, ClusteringPrefix.Serializer
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.db.AbstractBufferClusteringPrefix
EMPTY_VALUES_ARRAY
-
Fields inherited from class org.apache.cassandra.db.AbstractOnHeapClusteringPrefix
kind, values
-
Fields inherited from interface org.apache.cassandra.db.Clustering
EMPTY, serializer, STATIC_CLUSTERING
-
Fields inherited from interface org.apache.cassandra.db.ClusteringPrefix
serializer
-
-
Constructor Summary
Constructors Constructor Description BufferClustering(java.nio.ByteBuffer... values)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BufferClustering
make(java.nio.ByteBuffer... values)
long
unsharedHeapSize()
long
unsharedHeapSizeExcludingData()
-
Methods inherited from class org.apache.cassandra.db.AbstractBufferClusteringPrefix
accessor, getBufferArray, retainable
-
Methods inherited from class org.apache.cassandra.db.AbstractOnHeapClusteringPrefix
clustering, equals, get, getRawValues, hashCode, kind, size
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.db.Clusterable
clustering
-
Methods inherited from interface org.apache.cassandra.db.Clustering
asEndBound, asStartBound, clone, toCQLString, toString
-
Methods inherited from interface org.apache.cassandra.db.ClusteringPrefix
accessor, bufferAt, clusteringString, dataSize, digest, get, getBufferArray, getRawValues, isBottom, isEmpty, isTop, kind, retainable, serializeAsPartitionKey, size, stringAt, validate, validate
-
-
-
-
Method Detail
-
unsharedHeapSize
public long unsharedHeapSize()
- Specified by:
unsharedHeapSize
in interfaceIMeasurableMemory
- Returns:
- the amount of on-heap memory retained by the object that might be reclaimed if the object were reclaimed, i.e. it should try to exclude globally cached data where possible, or counting portions of arrays that are referenced by the object but used by other objects only (e.g. slabbed byte-buffers), etc.
-
unsharedHeapSizeExcludingData
public long unsharedHeapSizeExcludingData()
- Specified by:
unsharedHeapSizeExcludingData
in interfaceClustering<java.nio.ByteBuffer>
-
make
public static BufferClustering make(java.nio.ByteBuffer... values)
-
-