|
db4o 8.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.db4o.defragment.AbstractIdMapping
com.db4o.defragment.DatabaseIdMapping
public class DatabaseIdMapping
Database based mapping for IDs during a defragmentation run.
Use this mapping to keep memory consumption lower than when
using the InMemoryIdMapping
.
Defragment
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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,
com.db4o.internal.slots.Slot slot)
Maps an ID to a slot |
int |
mappedId(int oldID)
Returns a previously registered mapping ID for the given ID if it exists. |
void |
open()
Prepares the mapping for use. |
com.db4o.foundation.Visitable<com.db4o.internal.slots.SlotChange> |
slotChanges()
provides a Visitable of all mappings of IDs to slots. |
Methods inherited from class com.db4o.defragment.AbstractIdMapping |
---|
mapId |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public 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)Method Detail |
---|
public int mappedId(int oldID)
IdMapping
public void open() throws java.io.IOException
IdMapping
java.io.IOException
public void close()
IdMapping
public void mapId(int id, com.db4o.internal.slots.Slot slot)
IdMapping
public com.db4o.foundation.Visitable<com.db4o.internal.slots.SlotChange> slotChanges()
IdMapping
public int addressForId(int id)
IdMapping
public void commit()
|
db4o 8.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |