Class 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 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 (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).

    • Constructor Detail

      • BufferClustering

        public BufferClustering​(java.nio.ByteBuffer... values)
    • Method Detail

      • unsharedHeapSize

        public long unsharedHeapSize()
        Specified by:
        unsharedHeapSize in interface IMeasurableMemory
        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.