Class NativeClustering

    • Method Detail

      • size

        public int size()
        Description copied from interface: ClusteringPrefix
        The number of values in this prefix. There can't be more values that the this is a prefix of has of clustering columns.
        Specified by:
        size in interface ClusteringPrefix<java.nio.ByteBuffer>
        Returns:
        the number of values in this prefix.
      • get

        public java.nio.ByteBuffer get​(int i)
        Description copied from interface: ClusteringPrefix
        Retrieves the ith value of this prefix.
        Specified by:
        get in interface ClusteringPrefix<java.nio.ByteBuffer>
        Parameters:
        i - the index of the value to retrieve. Must be such that 0 <= i < size().
        Returns:
        the ith value of this prefix. Note that a value can be null.
      • getRawValues

        public java.nio.ByteBuffer[] getRawValues()
        Description copied from interface: ClusteringPrefix
        The values of this prefix as an array.

        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.

        Specified by:
        getRawValues in interface ClusteringPrefix<java.nio.ByteBuffer>
        Returns:
        the values for this prefix as an array.
      • 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.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public final boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • retainable

        public ClusteringPrefix<java.nio.ByteBuffer> retainable()
        Description copied from interface: ClusteringPrefix
        Return the key in a form that can be retained for longer-term use. This means extracting keys stored in shared memory (i.e. in memtables) to minimized on-heap versions. If the object is already in minimal form, no action will be taken.
        Specified by:
        retainable in interface ClusteringPrefix<java.nio.ByteBuffer>