db4o 6.1

com.db4o.defragment
Class TreeIDMapping

java.lang.Object
  extended by com.db4o.defragment.AbstractContextIDMapping
      extended by com.db4o.defragment.TreeIDMapping
All Implemented Interfaces:
ContextIDMapping

public class TreeIDMapping
extends AbstractContextIDMapping

In-memory mapping for IDs during a defragmentation run.

See Also:
Defragment

Constructor Summary
TreeIDMapping()
           
 
Method Summary
 void close()
          Shuts down the mapping after use.
 int mappedID(int oldID, boolean lenient)
          Returns a previously registered mapping ID for the given ID if it exists.
 void open()
          Prepares the mapping for use.
 
Methods inherited from class com.db4o.defragment.AbstractContextIDMapping
mapIDs
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeIDMapping

public TreeIDMapping()
Method Detail

mappedID

public int mappedID(int oldID,
                    boolean lenient)
Description copied from interface: ContextIDMapping
Returns a previously registered mapping ID for the given ID if it exists. If lenient mode is set to true, will provide the mapping ID for the next smaller original ID a mapping exists for. Otherwise returns 0.

Parameters:
oldID - The original ID
lenient - If true, lenient mode will be used for lookup, strict mode otherwise.
Returns:
The mapping ID for the given original ID or 0, if none has been registered.

open

public void open()
Description copied from interface: ContextIDMapping
Prepares the mapping for use.


close

public void close()
Description copied from interface: ContextIDMapping
Shuts down the mapping after use.


db4o 6.1