Interface ClusteringPrefix<V>

    • Method Detail

      • isBottom

        default boolean isBottom()
      • isTop

        default boolean isTop()
      • size

        int size()
        The number of values in this prefix. There can't be more values that the this is a prefix of has of clustering columns.
        Returns:
        the number of values in this prefix.
      • isEmpty

        default boolean isEmpty()
      • get

        V get​(int i)
        Retrieves the ith value of this prefix.
        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.
      • bufferAt

        default java.nio.ByteBuffer bufferAt​(int i)
      • digest

        default void digest​(Digest digest)
        Adds the data of this clustering prefix to the provided Digest instance.
        Parameters:
        digest - the Digest instance to which to add this prefix.
      • dataSize

        default int dataSize()
        The size of the data hold by this prefix.
        Returns:
        the size of the data hold by this prefix (this is not the size of the object in memory, just the size of the data it stores).
      • toString

        java.lang.String toString​(TableMetadata metadata)
        Generates a proper string representation of the prefix.
        Parameters:
        metadata - the metadata for the table the clustering prefix is of.
        Returns:
        a human-readable string representation fo this prefix.
      • serializeAsPartitionKey

        default java.nio.ByteBuffer serializeAsPartitionKey()
      • getRawValues

        V[] getRawValues()
        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 size() and get(int) unless you actually need an array.

        Returns:
        the values for this prefix as an array.
      • getBufferArray

        java.nio.ByteBuffer[] getBufferArray()
      • equals

        static boolean equals​(ClusteringPrefix<?> prefix,
                              java.lang.Object o)