Interface PrimaryKeyMap

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    SkinnyPrimaryKeyMap, WidePrimaryKeyMap

    @NotThreadSafe
    public interface PrimaryKeyMap
    extends java.io.Closeable
    A bidirectional map of PrimaryKey to row ID. Implementations of this interface are not expected to be threadsafe.
    • Method Detail

      • primaryKeyFromRowId

        PrimaryKey primaryKeyFromRowId​(long sstableRowId)
        Returns a PrimaryKey for a row ID
        Parameters:
        sstableRowId - the row ID to lookup
        Returns:
        the PrimaryKey associated with the row ID
      • ceiling

        long ceiling​(Token token)
        Returns the first row ID of the nearest Token greater than or equal to the given Token, or a negative value if not found
        Parameters:
        token - the Token to lookup
        Returns:
        the ceiling row ID associated with the Token or a negative value
      • floor

        long floor​(Token token)
        Returns the last row ID of the nearest Token less than or equal to the given Token, or a negative value if the Token is at its minimum value
        Parameters:
        token - the Token to lookup
        Returns:
        the floor row ID associated with the Token
      • close

        default void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable