public class DatabaseIdMapping extends AbstractIdMapping
InMemoryIdMapping.Defragment| Constructor and Description |
|---|
DatabaseIdMapping(java.lang.String fileName)
Will maintain the ID mapping as a BTree in the file with the given path.
|
DatabaseIdMapping(java.lang.String fileName,
int nodeSize,
int commitFrequency)
Will maintain the ID mapping as a BTree in the file with the given path.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addressForId(int id)
returns the slot address for an ID
|
void |
close()
Shuts down the mapping after use.
|
void |
commit() |
void |
mapId(int id,
Slot slot)
Maps an ID to a slot
|
protected void |
mapNonClassIDs(int origID,
int mappedID) |
int |
mappedId(int oldID)
Returns a previously registered mapping ID for the given ID if it exists.
|
void |
open()
Prepares the mapping for use.
|
Visitable<SlotChange> |
slotChanges()
provides a Visitable of all mappings of IDs to slots.
|
mapId, mappedClassIDpublic DatabaseIdMapping(java.lang.String fileName)
fileName - The location where the BTree file should be created.public DatabaseIdMapping(java.lang.String fileName,
int nodeSize,
int commitFrequency)
fileName - The location where the BTree file should be created.nodeSize - The size of a BTree nodecommitFrequency - The number of inserts after which a commit should be issued (<=0: never commit)public int mappedId(int oldID)
IdMappingprotected void mapNonClassIDs(int origID,
int mappedID)
mapNonClassIDs in class AbstractIdMappingpublic void open()
throws java.io.IOException
IdMappingjava.io.IOExceptionpublic void close()
IdMappingpublic void mapId(int id,
Slot slot)
IdMappingpublic Visitable<SlotChange> slotChanges()
IdMappingpublic int addressForId(int id)
IdMappingpublic void commit()