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

Matthew Swift
24.03.2015 b506a6cd184bd8cf477f7d9a7f968c990f153528
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DN2ID.java
@@ -58,21 +58,19 @@
  }
  /**
   * Insert a new record into the DN database.
   * Adds a new record into the DN database replacing any existing record having the same DN.
   * @param txn A JE database transaction to be used for the database operation,
   * or null if none.
   * @param dn The entry DN, which is the key to the record.
   * @param id The entry ID, which is the value of the record.
   * @return true if the record was inserted, false if a record with that key
   * already exists.
   * @throws StorageRuntimeException If an error occurred while attempting to insert
   * the new record.
   */
  boolean insert(WriteableStorage txn, DN dn, EntryID id) throws StorageRuntimeException
  void put(WriteableStorage txn, DN dn, EntryID id) throws StorageRuntimeException
  {
    ByteString key = dnToDNKey(dn, prefixRDNComponents);
    ByteString value = id.toByteString();
    return txn.putIfAbsent(getName(), key, value);
    txn.create(getName(), key, value);
  }
  /**
@@ -109,15 +107,4 @@
    }
    return null;
  }
  EntryID getRMW(ReadableStorage txn, DN dn) throws StorageRuntimeException
  {
    ByteString key = dnToDNKey(dn, prefixRDNComponents);
    ByteString value = txn.getRMW(getName(), key);
    if (value != null)
    {
      return new EntryID(value);
    }
    return null;
  }
}