Interface PrimaryKeyMap

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
SkinnyPrimaryKeyMap, WidePrimaryKeyMap

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

    • getSSTableId

      SSTableId getSSTableId()
      Returns the SSTableId associated with this PrimaryKeyMap
      Returns:
      an SSTableId
    • 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
    • rowIdFromPrimaryKey

      long rowIdFromPrimaryKey(PrimaryKey key)
      Returns a row ID for a PrimaryKey
      Parameters:
      key - the PrimaryKey to lookup
      Returns:
      the row ID associated with the PrimaryKey
    • 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 AutoCloseable
      Specified by:
      close in interface Closeable