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

Jean-Noël Rouvignac
01.00.2015 6f1a7f89a2bc9812c61f71d282ead3299556f876
Ran UCDetector on the pluggable and PDB backend
4 files deleted
11 files modified
846 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AbstractTree.java 8 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DN2URI.java 10 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DefaultIndex.java 11 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryContainer.java 25 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryIDSet.java 6 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Count.java 9 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ImportIDSet.java 190 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ImportLDIFReader.java 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ImportRecord.java 150 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ImportSuffixCommand.java 181 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/OnDiskMergeImporter.java 8 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/SuccessiveAddsImportStrategy.java 225 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Tree.java 7 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/AccessMode.java 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/TreeName.java 12 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AbstractTree.java
@@ -38,7 +38,7 @@
abstract class AbstractTree implements Tree, Comparable<Tree>
{
  /** The name of the tree within the entryContainer. */
  private TreeName name;
  private final TreeName name;
  AbstractTree(final TreeName name)
  {
@@ -77,12 +77,6 @@
  }
  @Override
  public final void setName(TreeName name)
  {
    this.name = name;
  }
  @Override
  public final String toString()
  {
    return name.toString();
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DN2URI.java
@@ -684,16 +684,8 @@
    return new SearchResultReference(URIList);
  }
  ByteString toKey(DN dn)
  private ByteString toKey(DN dn)
  {
    return DnKeyFormat.dnToDNKey(dn, prefixRDNComponents);
  }
  ByteSequence toValue(DN dn, Entry entry)
  {
    // FIXME JNR This is not very efficient:
    // getReferralsURL() converts from bytestring into string
    // and the code down below then does the reverse
    return encode(dn, entry.getReferralURLs());
  }
}
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DefaultIndex.java
@@ -52,7 +52,6 @@
 * is a byte array, and is constructed from some normalized form of an attribute value (or fragment
 * of a value) appearing in the entry.
 */
@SuppressWarnings("javadoc")
class DefaultIndex extends AbstractTree implements Index
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -129,21 +128,11 @@
    return codec.decode(key, value);
  }
  ByteString toValue(EntryID entryID)
  {
    return codec.encode(newDefinedSet(entryID.longValue()));
  }
  ByteString toValue(EntryIDSet entryIDSet)
  {
    return codec.encode(entryIDSet);
  }
  ByteString toValue(ImportIDSet importIDSet)
  {
    return importIDSet.valueToByteString(codec);
  }
  @Override
  public final void update(final WriteableTransaction txn, final ByteString key, final EntryIDSet deletedIDs,
      final EntryIDSet addedIDs) throws StorageRuntimeException
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryContainer.java
@@ -1526,7 +1526,7 @@
    }
  }
  void addEntry0(final Entry entry, final DN parentDN, final EntryID entryID, final IndexBuffer indexBuffer,
  private void addEntry0(final Entry entry, final DN parentDN, final EntryID entryID, final IndexBuffer indexBuffer,
      final ByteString encodedEntry, WriteableTransaction txn) throws DirectoryException
  {
    // Check that the parent entry exists.
@@ -2763,29 +2763,6 @@
  }
  /**
   * Clear the contents for a tree from disk.
   *
   * @param txn a non null transaction
   * @param tree The tree to clear.
   * @throws StorageRuntimeException if a storage error occurs.
   */
  void clearTree(WriteableTransaction txn, Tree tree) throws StorageRuntimeException
  {
    try
    {
      tree.delete(txn);
    }
    finally
    {
      tree.open(txn, true);
    }
    if(logger.isTraceEnabled())
    {
      logger.trace("Cleared the tree %s", tree.getName());
    }
  }
  /**
   * Finds an existing entry whose DN is the closest ancestor of a given baseDN.
   *
   * @param baseDN  the DN for which we are searching a matched DN.
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryIDSet.java
@@ -886,12 +886,6 @@
    return concreteImpl.getRange();
  }
  static long addWithoutOverflow(long a, long b) {
    // a and b must be > 0
    final long result = a + b;
    return result >= 0 ? result : Long.MAX_VALUE;
  }
  private static long[] mergeOverlappingEntryIDSet(long set1[], long set2[])
  {
    final long[] a, b;
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Count.java
@@ -134,15 +134,6 @@
    return getKeyFromEntryIDAndBucket(entryID, bucket);
  }
  ByteSequence toKey(EntryID entryID)
  {
    if (entryID == null)
    {
      entryID = TOTAL_COUNT_ENTRY_ID;
    }
    return getShardedKey(entryID);
  }
  ByteString toValue(final long count)
  {
    Reject.ifFalse(count != 0, "count must be != 0");
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ImportIDSet.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ImportLDIFReader.java
@@ -64,7 +64,7 @@
    private final EntryID entryID;
    private final EntryContainer entryContainer;
    EntryInformation(Entry entry, EntryID entryID, EntryContainer entryContainer)
    private EntryInformation(Entry entry, EntryID entryID, EntryContainer entryContainer)
    {
      this.entry = entry;
      this.entryID = entryID;
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ImportRecord.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ImportSuffixCommand.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/OnDiskMergeImporter.java
@@ -698,7 +698,7 @@
    this.importStrategy = importStrategy;
  }
  public void doImport(final Source source) throws Exception
  private void doImport(final Source source) throws Exception
  {
    final long phaseOneStartTime = System.currentTimeMillis();
    final PhaseOneWriteableTransaction transaction = new PhaseOneWriteableTransaction(importStrategy);
@@ -1629,7 +1629,7 @@
      private final long startOffset;
      private long size;
      private MappedByteBuffer mmapBuffer;
      private OutputStream mmapBufferOS = new OutputStream()
      private final OutputStream mmapBufferOS = new OutputStream()
      {
        @Override
        public void write(int arg0) throws IOException
@@ -2555,7 +2555,7 @@
        }
    }
    static boolean supportOffHeap()
    private static boolean supportOffHeap()
    {
      return unsafe != null;
    }
@@ -2575,7 +2575,7 @@
      return bufferSize;
    }
    public Buffer get()
    private Buffer get()
    {
      try
      {
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/SuccessiveAddsImportStrategy.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Tree.java
@@ -76,11 +76,4 @@
   * @return name for this tree.
   */
  TreeName getName();
  /**
   * Set the name to use for this tree.
   *
   * @param name The name to use for this tree.
   */
  void setName(TreeName name);
}
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/AccessMode.java
@@ -32,7 +32,7 @@
  /** Constant used to open the Storage in read-write mode; implies trees will be created if not already present. */
  READ_WRITE(true);
  private boolean readWrite;
  private final boolean readWrite;
  AccessMode(boolean update)
  {
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/TreeName.java
@@ -84,17 +84,7 @@
    return indexId;
  }
  /**
   * Returns a new tree name object created by replacing the baseDN of the current object.
   *
   * @param newBaseDN
   *          the new base DN that replaces the existing base DN
   * @return a new tree name object with the provided the base DN
   */
  public TreeName replaceBaseDN(String newBaseDN)
  {
    return new TreeName(newBaseDN, indexId);
  }
  /** {@inheritDoc} */
  @Override