public class Clustering extends AbstractClusteringPrefix
A Clustering
is a ClusteringPrefix
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, and this mostly for thrift backward compatibility (in practice, if a value is null,
all of the following ones will be too because that's what thrift allows, but it's never assumed by the
code so we could start generally allowing nulls for clustering columns if we wanted to).
Modifier and Type | Class and Description |
---|---|
static class |
Clustering.Serializer
Serializer for Clustering object.
|
ClusteringPrefix.Deserializer, ClusteringPrefix.Kind
Modifier and Type | Field and Description |
---|---|
static Clustering |
EMPTY
Empty clustering for tables having no clustering columns.
|
static Clustering.Serializer |
serializer |
static Clustering |
STATIC_CLUSTERING
The special cased clustering used by all static rows.
|
EMPTY_VALUES_ARRAY, kind, values
Constructor and Description |
---|
Clustering(java.nio.ByteBuffer... values) |
Modifier and Type | Method and Description |
---|---|
Clustering |
copy(AbstractAllocator allocator) |
ClusteringPrefix.Kind |
kind() |
java.lang.String |
toCQLString(CFMetaData metadata) |
java.lang.String |
toString(CFMetaData metadata)
Generates a proper string representation of the prefix.
|
clustering, dataSize, digest, equals, get, getRawValues, hashCode, size, unsharedHeapSize, unsharedHeapSizeExcludingData
public static final Clustering.Serializer serializer
public static final Clustering STATIC_CLUSTERING
public static final Clustering EMPTY
public ClusteringPrefix.Kind kind()
kind
in interface ClusteringPrefix
kind
in class AbstractClusteringPrefix
public Clustering copy(AbstractAllocator allocator)
public java.lang.String toString(CFMetaData metadata)
ClusteringPrefix
metadata
- the metadata for the table the clustering prefix is of.public java.lang.String toCQLString(CFMetaData metadata)
Copyright © 2016 The Apache Software Foundation