mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

boli
29.45.2008 4e0231d95ce73b8354afa7827cba077b9b105c85
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/Indexer.java
@@ -29,11 +29,11 @@
import org.opends.server.types.Entry;
import org.opends.server.types.Modification;
import com.sleepycat.je.DatabaseException;
import com.sleepycat.je.Transaction;
import java.util.Comparator;
import java.util.Set;
import java.util.List;
import java.util.Map;
/**
 * This class attempts to abstract the generation and comparison of keys
@@ -52,51 +52,38 @@
  /**
   * Generate the set of index keys for an entry.
   *
   * @param txn A database transaction to be used if the database need to be
   * accessed in the course of generating the index keys.
   * @param entry The entry.
   * @param keys The set into which the generated keys will be inserted.
   * @throws DatabaseException If an error occurs in the JE database.
   */
  public abstract void indexEntry(Transaction txn, Entry entry,
                                Set<byte[]> keys)
  public abstract void indexEntry(Entry entry, Set<byte[]> keys)
       throws DatabaseException;
  /**
   * Generate the set of index keys to be added and the set of index keys
   * to be deleted for an entry that has been replaced.
   *
   * @param txn A database transaction to be used if the database need to be
   * accessed in the course of generating the index keys.
   * @param oldEntry The original entry contents.
   * @param newEntry The new entry contents.
   * @param addKeys The set into which the keys to be added will be inserted.
   * @param delKeys The set into which the keys to be deleted will be inserted.
   * @param modifiedKeys The map into which the modified keys will be inserted.
   * @throws DatabaseException If an error occurs in the JE database.
   */
  public abstract void replaceEntry(Transaction txn,
                                    Entry oldEntry, Entry newEntry,
                                    Set<byte[]> addKeys,
                                    Set<byte[]> delKeys)
  public abstract void replaceEntry(Entry oldEntry, Entry newEntry,
                                    Map<byte[], Boolean> modifiedKeys)
       throws DatabaseException;
  /**
   * Generate the set of index keys to be added and the set of index keys
   * to be deleted for an entry that was modified.
   *
   * @param txn A database transaction to be used if the database need to be
   * accessed in the course of generating the index keys.
   * @param oldEntry The original entry contents.
   * @param newEntry The new entry contents.
   * @param mods The set of modifications that were applied to the entry.
   * @param addKeys The set into which the keys to be added will be inserted.
   * @param delKeys The set into which the keys to be deleted will be inserted.
   * @param modifiedKeys The map into which the modified keys will be inserted.
   * @throws DatabaseException If an error occurs in the JE database.
   */
  public abstract void modifyEntry(Transaction txn,
                                   Entry oldEntry, Entry newEntry,
  public abstract void modifyEntry(Entry oldEntry, Entry newEntry,
                                   List<Modification> mods,
                                   Set<byte[]> addKeys,
                                   Set<byte[]> delKeys)
                                   Map<byte[], Boolean> modifiedKeys)
       throws DatabaseException;
}