public abstract class AbstractClusteringPrefix extends java.lang.Object implements ClusteringPrefix
ClusteringPrefix.Deserializer, ClusteringPrefix.Kind, ClusteringPrefix.Serializer| Modifier and Type | Field and Description |
|---|---|
protected static java.nio.ByteBuffer[] |
EMPTY_VALUES_ARRAY |
protected ClusteringPrefix.Kind |
kind |
protected java.nio.ByteBuffer[] |
values |
serializer| Modifier | Constructor and Description |
|---|---|
protected |
AbstractClusteringPrefix(ClusteringPrefix.Kind kind,
java.nio.ByteBuffer[] values) |
| Modifier and Type | Method and Description |
|---|---|
ClusteringPrefix |
clustering() |
int |
dataSize()
The size of the data hold by this prefix.
|
void |
digest(java.security.MessageDigest digest)
Adds the data of this clustering prefix to the provided digest.
|
boolean |
equals(java.lang.Object o) |
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.
|
int |
hashCode() |
ClusteringPrefix.Kind |
kind() |
int |
size()
The number of values in this prefix.
|
long |
unsharedHeapSize() |
long |
unsharedHeapSizeExcludingData() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waittoStringprotected static final java.nio.ByteBuffer[] EMPTY_VALUES_ARRAY
protected final ClusteringPrefix.Kind kind
protected final java.nio.ByteBuffer[] values
protected AbstractClusteringPrefix(ClusteringPrefix.Kind kind, java.nio.ByteBuffer[] values)
public ClusteringPrefix.Kind kind()
kind in interface ClusteringPrefixpublic ClusteringPrefix clustering()
clustering in interface Clusterablepublic int size()
ClusteringPrefixsize in interface ClusteringPrefixpublic java.nio.ByteBuffer get(int i)
ClusteringPrefixget in interface ClusteringPrefixi - 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.
getRawValues in interface ClusteringPrefixpublic int dataSize()
ClusteringPrefixdataSize in interface ClusteringPrefixpublic void digest(java.security.MessageDigest digest)
ClusteringPrefixdigest in interface ClusteringPrefixdigest - the digest to which to add this prefix.public long unsharedHeapSize()
unsharedHeapSize in interface IMeasurableMemorypublic long unsharedHeapSizeExcludingData()
public final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object o)
equals in class java.lang.ObjectCopyright © 2015 The Apache Software Foundation