db4o 8.0

com.db4o.defragment
Interface IdMapping

All Known Implementing Classes:
AbstractIdMapping, DatabaseIdMapping, InMemoryIdMapping

public interface IdMapping

The ID mapping used internally during a defragmentation run.

See Also:
Defragment

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 origId, int mappedId, boolean isClassId)
          Registers a mapping for the given IDs.
 void mapId(int id, com.db4o.internal.slots.Slot slot)
          Maps an ID to a slot
 int mappedId(int origId)
          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.
 

Method Detail

mappedId

int mappedId(int origId)
Returns a previously registered mapping ID for the given ID if it exists.

Parameters:
origID - The original ID
Returns:
The mapping ID for the given original ID or 0, if none has been registered.

mapId

void mapId(int origId,
           int mappedId,
           boolean isClassId)
Registers a mapping for the given IDs.

Parameters:
origID - The original ID
mappedID - The ID to be mapped to the original ID.
isClassID - true if the given original ID specifies a class slot, false otherwise.

mapId

void mapId(int id,
           com.db4o.internal.slots.Slot slot)
Maps an ID to a slot

Parameters:
id -
slot -

slotChanges

com.db4o.foundation.Visitable<com.db4o.internal.slots.SlotChange> slotChanges()
provides a Visitable of all mappings of IDs to slots.


open

void open()
          throws java.io.IOException
Prepares the mapping for use.

Throws:
java.io.IOException

close

void close()
Shuts down the mapping after use.


addressForId

int addressForId(int id)
returns the slot address for an ID


commit

void commit()

db4o 8.0

Copyright 2009 Versant Corporation. All rights reserved.