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)
      • validate

        default void validate()
      • 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.
      • asStartBound

        ClusteringBound<V> asStartBound()
        Returns this prefix as a start bound. If this prefix is a bound, just returns it asserting that it is a start bound. If this prefix is a clustering, returns an included start bound. If this prefix is a boundary, returns an open bound of it
      • asEndBound

        ClusteringBound<V> asEndBound()
        Returns this prefix as an end bound. If this prefix is a bound, just returns it asserting that it is an end bound. If this prefix is a clustering, returns an included end bound. In this prefix is a boundary, returns a close bound of it.
      • serializeAsPartitionKey

        default java.nio.ByteBuffer serializeAsPartitionKey()
      • clusteringString

        default java.lang.String clusteringString​(java.util.List<AbstractType<?>> types)
        Produce a human-readable representation of the clustering given the list of types. Easier to access than metadata for debugging.
      • 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()
      • retainable

        ClusteringPrefix<V> retainable()
        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.
      • equals

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