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

Jean-Noel Rouvignac
05.39.2014 3503c263ca6142b425bdf7e105c5bd53529dd30f
OPENDJ-1602 (CR-5566) New pluggable storage based backend

Deleted dead code.


NullIndex.java, Index.java:
Removed dead method: insert(ImportIDSet, Set<byte[]> keySet, DatabaseEntry keyData, DatabaseEntry data).
2 files modified
43 ■■■■■ changed files
opendj3-server-dev/src/server/org/opends/server/backends/jeb/Index.java 33 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/jeb/NullIndex.java 10 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/jeb/Index.java
@@ -61,19 +61,16 @@
  /** The comparator for index keys. */
  private final Comparator<byte[]> comparator;
  /** The comparator for index keys. */
  private final Comparator<ByteSequence> bsComparator;
  /** The limit on the number of entry IDs that may be indexed by one key. */
  private int indexEntryLimit;
  /**
   * Limit on the number of entry IDs that may be retrieved by cursoring
   * through an index.
   */
  private final int cursorEntryLimit;
  /**
   * Number of keys that have exceeded the entry limit since this
   * object was created.
@@ -146,8 +143,8 @@
    this.maintainCount = maintainCount;
    this.newImportIDSet = new ImportIDSet(indexEntryLimit,
                                          indexEntryLimit, maintainCount);
    DatabaseConfig dbNodupsConfig = new DatabaseConfig();
    final DatabaseConfig dbNodupsConfig = new DatabaseConfig();
    if(env.getConfig().getReadOnly())
    {
      dbNodupsConfig.setReadOnly(true);
@@ -218,7 +215,6 @@
    }
  }
  private void insertKey(DatabaseEntry key, ImportIDSet importIdSet, DatabaseEntry data) throws DatabaseException {
    final OperationStatus status = read(null, key, data, LockMode.DEFAULT);
    if(status == OperationStatus.SUCCESS) {
@@ -241,7 +237,6 @@
    }
  }
  /**
   * Insert the specified import ID set into this index. Creates a DB
   * cursor if needed.
@@ -260,7 +255,6 @@
    insertKey(key, importIdSet, data);
  }
  /**
   * Delete the specified import ID set from the import ID set associated with
   * the key.
@@ -280,29 +274,6 @@
    deleteKey(key, importIdSet, data);
  }
  /**
   * Add the specified import ID set to the provided keys in the keyset.
   *
   * @param importIDSet A import ID set to use.
   * @param keySet  The set containing the keys.
   * @param keyData A key database entry to use.
   * @param data A database entry to use for data.
   * @return <CODE>True</CODE> if the insert was successful.
   * @throws DatabaseException If a database error occurs.
   */
  public synchronized boolean insert(ImportIDSet importIDSet, Set<byte[]> keySet,
                 DatabaseEntry keyData, DatabaseEntry data)
          throws DatabaseException {
    for(byte[] key : keySet) {
      keyData.setData(key);
      insert(keyData, importIDSet, data);
    }
    keyData.setData(null);
    data.setData(null);
    return true;
  }
  /**
   * Update the set of entry IDs for a given key.
   *
@@ -671,7 +642,6 @@
    }
  }
  /**
   * Reads a range of keys and collects all their entry IDs into a
   * single set.
@@ -814,7 +784,6 @@
    }
  }
  /**
   * Update the index buffer for a deleted entry.
   *
opendj3-server-dev/src/server/org/opends/server/backends/jeb/NullIndex.java
@@ -25,7 +25,6 @@
package org.opends.server.backends.jeb;
import java.util.List;
import java.util.Set;
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.ConditionResult;
@@ -85,15 +84,6 @@
  /** {@inheritDoc} */
  @Override
  public boolean insert(ImportIDSet importIDSet,
      Set<byte[]> keySet, DatabaseEntry keyData, DatabaseEntry data)
      throws DatabaseException
  {
    return true;
  }
  /** {@inheritDoc} */
  @Override
  void updateKey(Transaction txn, DatabaseEntry key, EntryIDSet deletedIDs,
      EntryIDSet addedIDs) throws DatabaseException
  {