Package com.db4o.defragment
Class InMemoryIdMapping
- java.lang.Object
- 
- com.db4o.defragment.AbstractIdMapping
- 
- com.db4o.defragment.InMemoryIdMapping
 
 
- 
- All Implemented Interfaces:
- IdMapping
 
 public class InMemoryIdMapping extends AbstractIdMapping In-memory mapping for IDs during a defragmentation run. This is faster than theDatabaseIdMappingbut it uses more memory. If you have OutOfMemory conditions with this id mapping, use theDatabaseIdMappinginstead.- See Also:
- Defragment
 
- 
- 
Constructor SummaryConstructors Constructor Description InMemoryIdMapping()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddressForId(int id)returns the slot address for an IDvoidclose()Shuts down the mapping after use.voidcommit()voidmapId(int id, Slot slot)Maps an ID to a slotprotected voidmapNonClassIDs(int origID, int mappedID)intmappedId(int oldID)Returns a previously registered mapping ID for the given ID if it exists.voidopen()Prepares the mapping for use.Visitable<SlotChange>slotChanges()provides a Visitable of all mappings of IDs to slots.- 
Methods inherited from class com.db4o.defragment.AbstractIdMappingmapId, mappedClassID
 
- 
 
- 
- 
- 
Method Detail- 
mappedIdpublic int mappedId(int oldID) Description copied from interface:IdMappingReturns a previously registered mapping ID for the given ID if it exists.- Returns:
- The mapping ID for the given original ID or 0, if none has been registered.
 
 - 
openpublic void open() Description copied from interface:IdMappingPrepares the mapping for use.
 - 
closepublic void close() Description copied from interface:IdMappingShuts down the mapping after use.
 - 
mapNonClassIDsprotected void mapNonClassIDs(int origID, int mappedID)- Specified by:
- mapNonClassIDsin class- AbstractIdMapping
 
 - 
addressForIdpublic int addressForId(int id) Description copied from interface:IdMappingreturns the slot address for an ID
 - 
mapIdpublic void mapId(int id, Slot slot)Description copied from interface:IdMappingMaps an ID to a slot
 - 
slotChangespublic Visitable<SlotChange> slotChanges() Description copied from interface:IdMappingprovides a Visitable of all mappings of IDs to slots.
 - 
commitpublic void commit() 
 
- 
 
-