Interface IdMapper<K>
- Type Parameters:
K- External identifier type (UUID, String, Long, byte[])
- All Known Implementing Classes:
BytesIdMapper, LongIdMapper, StringIdMapper, UuidIdMapper
public interface IdMapper<K>
Bi-directional mapping interface between external domain identifiers (UUID,
String, Long, byte[]) and internal dense 64-bit/32-bit node IDs.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all in-memory mappings.Obtains the entity/domain name associated with this mapper.getExternalKey(long denseId) Resolves a local dense node ID back to its external key.Looks up the dense node ID for a given external key without assigning a new one.longgetOrAssignId(K key) Resolves an external key to a dense 64-bit node ID, assigning a new ID if absent.voidregisterMapping(K key, long denseId) Registers a known external key to dense ID mapping (e.g. loaded from binary Section 4 or database).intsize()Returns the total count of mapped IDs.
-
Method Details
-
getDomainType
String getDomainType()Obtains the entity/domain name associated with this mapper. -
getOrAssignId
Resolves an external key to a dense 64-bit node ID, assigning a new ID if absent. -
registerMapping
Registers a known external key to dense ID mapping (e.g. loaded from binary Section 4 or database). -
getExternalKey
Resolves a local dense node ID back to its external key. -
getId
-
size
int size()Returns the total count of mapped IDs. -
clear
void clear()Clears all in-memory mappings.
-