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 ofPrimaryKey
to row ID. Implementations of this interface are not expected to be threadsafe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
PrimaryKeyMap.Factory
A factory for creatingPrimaryKeyMap
instances.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description long
ceiling(Token token)
default void
close()
long
floor(Token token)
PrimaryKey
primaryKeyFromRowId(long sstableRowId)
Returns aPrimaryKey
for a row IDlong
rowIdFromPrimaryKey(PrimaryKey key)
Returns a row ID for aPrimaryKey
-
-
-
Method Detail
-
primaryKeyFromRowId
PrimaryKey primaryKeyFromRowId(long sstableRowId)
Returns aPrimaryKey
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 aPrimaryKey
- Parameters:
key
- thePrimaryKey
to lookup- Returns:
- the row ID associated with the
PrimaryKey
-
ceiling
long ceiling(Token token)
-
floor
long floor(Token token)
-
close
default void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-