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

Jean-Noel Rouvignac
14.13.2014 f24b1a1660fbe70491fd88557a00c519605ac77f
opendj3-server-dev/src/server/org/opends/server/backends/jeb/NullIndex.java
@@ -20,26 +20,21 @@
 *
 * CDDL HEADER END
 *
 *      Copyright 2011 ForgeRock AS
 *      Copyright 2011-2014 ForgeRock AS
 */
package org.opends.server.backends.jeb;
import java.util.List;
import java.util.Set;
import org.forgerock.opendj.ldap.ConditionResult;
import org.opends.server.backends.jeb.importLDIF.ImportIDSet;
import org.opends.server.types.ConditionResult;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.Entry;
import org.opends.server.types.Modification;
import com.sleepycat.je.*;
/**
 * A null index which replaces id2children and id2subtree when they have been
 * disabled.
@@ -75,6 +70,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public boolean insertID(IndexBuffer buffer, byte[] keyBytes, EntryID entryID)
  {
    return true;
@@ -85,6 +81,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public boolean insertID(Transaction txn, DatabaseEntry key, EntryID entryID)
      throws DatabaseException
  {
@@ -96,6 +93,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void insert(DatabaseEntry key, ImportIDSet importIdSet,
      DatabaseEntry data) throws DatabaseException
  {
@@ -107,6 +105,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void delete(DatabaseEntry key, ImportIDSet importIdSet,
      DatabaseEntry data) throws DatabaseException
  {
@@ -118,6 +117,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public synchronized boolean insert(ImportIDSet importIDSet,
      Set<byte[]> keySet, DatabaseEntry keyData, DatabaseEntry data)
      throws DatabaseException
@@ -130,6 +130,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  void updateKey(Transaction txn, DatabaseEntry key, EntryIDSet deletedIDs,
      EntryIDSet addedIDs) throws DatabaseException
  {
@@ -141,6 +142,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public boolean removeID(IndexBuffer buffer, byte[] keyBytes, EntryID entryID)
  {
    return true;
@@ -151,6 +153,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void removeID(Transaction txn, DatabaseEntry key, EntryID entryID)
      throws DatabaseException
  {
@@ -162,6 +165,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void delete(Transaction txn, Set<byte[]> keySet, EntryID entryID)
      throws DatabaseException
  {
@@ -173,6 +177,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void delete(IndexBuffer buffer, byte[] keyBytes)
  {
    // Do nothing.
@@ -183,6 +188,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public ConditionResult containsID(Transaction txn, DatabaseEntry key,
      EntryID entryID) throws DatabaseException
  {
@@ -194,6 +200,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public EntryIDSet readKey(DatabaseEntry key, Transaction txn,
      LockMode lockMode)
  {
@@ -205,6 +212,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void writeKey(Transaction txn, DatabaseEntry key,
      EntryIDSet entryIDList) throws DatabaseException
  {
@@ -216,6 +224,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public EntryIDSet readRange(byte[] lower, byte[] upper,
      boolean lowerIncluded, boolean upperIncluded)
  {
@@ -227,6 +236,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public int getEntryLimitExceededCount()
  {
    return 0;
@@ -237,6 +247,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void closeCursor() throws DatabaseException
  {
    // Do nothing.
@@ -247,6 +258,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public boolean addEntry(IndexBuffer buffer, EntryID entryID, Entry entry)
      throws DatabaseException, DirectoryException
  {
@@ -258,6 +270,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public boolean addEntry(Transaction txn, EntryID entryID, Entry entry)
      throws DatabaseException, DirectoryException
  {
@@ -269,6 +282,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void removeEntry(IndexBuffer buffer, EntryID entryID, Entry entry)
      throws DatabaseException, DirectoryException
  {
@@ -280,6 +294,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void removeEntry(Transaction txn, EntryID entryID, Entry entry)
      throws DatabaseException, DirectoryException
  {
@@ -291,6 +306,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void modifyEntry(Transaction txn, EntryID entryID, Entry oldEntry,
      Entry newEntry, List<Modification> mods) throws DatabaseException
  {
@@ -302,6 +318,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void modifyEntry(IndexBuffer buffer, EntryID entryID, Entry oldEntry,
      Entry newEntry, List<Modification> mods) throws DatabaseException
  {
@@ -313,6 +330,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public boolean setIndexEntryLimit(int indexEntryLimit)
  {
    return false;
@@ -323,6 +341,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public int getIndexEntryLimit()
  {
    return 0;
@@ -333,6 +352,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public synchronized void setTrusted(Transaction txn, boolean trusted)
      throws DatabaseException
  {
@@ -344,6 +364,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public synchronized boolean isTrusted()
  {
    return true;
@@ -354,6 +375,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public synchronized boolean isRebuildRunning()
  {
    return false;
@@ -364,6 +386,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public synchronized void setRebuildStatus(boolean rebuildRunning)
  {
    // Do nothing.
@@ -374,6 +397,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public boolean getMaintainCount()
  {
    return false;
@@ -384,6 +408,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void open() throws DatabaseException
  {
    // Do nothing.
@@ -394,6 +419,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  synchronized void close() throws DatabaseException
  {
    // Do nothing.
@@ -404,6 +430,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  protected OperationStatus put(Transaction txn, DatabaseEntry key,
      DatabaseEntry data) throws DatabaseException
  {
@@ -415,6 +442,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  protected OperationStatus read(Transaction txn, DatabaseEntry key,
      DatabaseEntry data, LockMode lockMode) throws DatabaseException
  {
@@ -426,6 +454,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  protected OperationStatus insert(Transaction txn, DatabaseEntry key,
      DatabaseEntry data) throws DatabaseException
  {
@@ -437,6 +466,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  protected OperationStatus delete(Transaction txn, DatabaseEntry key)
      throws DatabaseException
  {
@@ -448,6 +478,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public Cursor openCursor(Transaction txn, CursorConfig cursorConfig)
      throws DatabaseException
  {
@@ -459,6 +490,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public long getRecordCount() throws DatabaseException
  {
    return 0;
@@ -469,6 +501,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public PreloadStats preload(PreloadConfig config) throws DatabaseException
  {
    return new PreloadStats();