db4o 7.4

com.db4o.defragment
Interface ContextIDMapping

All Known Implementing Classes:
AbstractContextIDMapping, BTreeIDMapping, TreeIDMapping

public interface ContextIDMapping

The ID mapping used internally during a defragmentation run.

See Also:
Defragment

Method Summary
 void close()
          Shuts down the mapping after use.
 void mapIDs(int origID, int mappedID, boolean isClassID)
          Registers a mapping for the given IDs.
 int mappedID(int origID, boolean lenient)
          Returns a previously registered mapping ID for the given ID if it exists.
 void open()
          Prepares the mapping for use.
 

Method Detail

mappedID

int mappedID(int origID,
             boolean lenient)
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:
origID - 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.

mapIDs

void mapIDs(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.

open

void open()
Prepares the mapping for use.


close

void close()
Shuts down the mapping after use.


db4o 7.4

Copyright 2007 db4objects Inc. All rights reserved.