public class NativeClustering extends java.lang.Object implements Clustering<java.nio.ByteBuffer>
Clustering.Serializer
ClusteringPrefix.Deserializer, ClusteringPrefix.Kind
EMPTY, serializer, STATIC_CLUSTERING
Constructor and Description |
---|
NativeClustering(NativeAllocator allocator,
OpOrder.Group writeOp,
Clustering<?> clustering) |
Modifier and Type | Method and Description |
---|---|
ValueAccessor<java.nio.ByteBuffer> |
accessor() |
ClusteringPrefix<java.nio.ByteBuffer> |
clustering() |
boolean |
equals(java.lang.Object o) |
java.nio.ByteBuffer |
get(int i)
Retrieves the ith value of this prefix.
|
java.nio.ByteBuffer[] |
getBufferArray() |
java.nio.ByteBuffer[] |
getRawValues()
The values of this prefix as an array.
|
int |
hashCode() |
ClusteringPrefix.Kind |
kind() |
ClusteringPrefix<java.nio.ByteBuffer> |
minimize()
If the prefix contains byte buffers that can be minimized (see
ByteBufferUtil.minimalBufferFor(ByteBuffer) ),
this will return a copy of the prefix with minimized values, otherwise it returns itself. |
int |
size()
The number of values in this prefix.
|
long |
unsharedHeapSize() |
long |
unsharedHeapSizeExcludingData() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
clone, make, toCQLString, toString
public NativeClustering(NativeAllocator allocator, OpOrder.Group writeOp, Clustering<?> clustering)
public ClusteringPrefix<java.nio.ByteBuffer> minimize()
ClusteringPrefix
ByteBufferUtil.minimalBufferFor(ByteBuffer)
),
this will return a copy of the prefix with minimized values, otherwise it returns itself.minimize
in interface ClusteringPrefix<java.nio.ByteBuffer>
public ClusteringPrefix.Kind kind()
kind
in interface ClusteringPrefix<java.nio.ByteBuffer>
public ClusteringPrefix<java.nio.ByteBuffer> clustering()
clustering
in interface Clusterable<java.nio.ByteBuffer>
public int size()
ClusteringPrefix
size
in interface ClusteringPrefix<java.nio.ByteBuffer>
public java.nio.ByteBuffer get(int i)
ClusteringPrefix
get
in interface ClusteringPrefix<java.nio.ByteBuffer>
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.
getRawValues
in interface ClusteringPrefix<java.nio.ByteBuffer>
public java.nio.ByteBuffer[] getBufferArray()
getBufferArray
in interface ClusteringPrefix<java.nio.ByteBuffer>
public ValueAccessor<java.nio.ByteBuffer> accessor()
accessor
in interface ClusteringPrefix<java.nio.ByteBuffer>
public long unsharedHeapSize()
unsharedHeapSize
in interface IMeasurableMemory
public long unsharedHeapSizeExcludingData()
unsharedHeapSizeExcludingData
in interface Clustering<java.nio.ByteBuffer>
public final int hashCode()
hashCode
in class java.lang.Object
public final boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Copyright © 2009- The Apache Software Foundation