public abstract class AbstractBufferClusteringPrefix extends AbstractClusteringPrefix
ClusteringPrefix.Deserializer, ClusteringPrefix.Kind, ClusteringPrefix.Serializer
Modifier and Type | Field and Description |
---|---|
static java.nio.ByteBuffer[] |
EMPTY_VALUES_ARRAY |
protected ClusteringPrefix.Kind |
kind |
protected java.nio.ByteBuffer[] |
values |
serializer
Modifier | Constructor and Description |
---|---|
protected |
AbstractBufferClusteringPrefix(ClusteringPrefix.Kind kind,
java.nio.ByteBuffer[] values) |
Modifier and Type | Method and Description |
---|---|
ClusteringPrefix |
clustering() |
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.
|
long |
unsharedHeapSize() |
long |
unsharedHeapSizeExcludingData() |
dataSize, digest, equals, hashCode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
toString
public static final java.nio.ByteBuffer[] EMPTY_VALUES_ARRAY
protected final ClusteringPrefix.Kind kind
protected final java.nio.ByteBuffer[] values
protected AbstractBufferClusteringPrefix(ClusteringPrefix.Kind kind, java.nio.ByteBuffer[] values)
public ClusteringPrefix.Kind kind()
public ClusteringPrefix clustering()
clustering
in interface Clusterable
clustering
in class AbstractClusteringPrefix
public int size()
ClusteringPrefix
public java.nio.ByteBuffer get(int i)
ClusteringPrefix
i
- the index of the value to retrieve. Must be such that 0 <= i < size()
.null
.public java.nio.ByteBuffer[] getRawValues()
ClusteringPrefix
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 ClusteringPrefix.size()
and
ClusteringPrefix.get(int)
unless you actually need an array.
public long unsharedHeapSize()
public long unsharedHeapSizeExcludingData()
Copyright © 2016 The Apache Software Foundation