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

Jean-Noël Rouvignac
01.41.2015 ad41085e4ca8a32e29d443591069ec4e94e65067
AutoRefactor'ed the pluggable and PDB backend
27 files modified
227 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/backends/pdb/PDBBackend.java 5 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pdb/PDBMonitor.java 1 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pdb/PDBStorage.java 16 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pdb/package-info.java 1 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AbstractTree.java 5 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AttributeIndex.java 3 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendMonitor.java 13 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/CursorTransformer.java 7 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DN2ID.java 3 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DnKeyFormat.java 5 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryContainer.java 8 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ExportJob.java 44 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Count.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Entry.java 5 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ImportRecord.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/IndexBuffer.java 3 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/IndexFilter.java 4 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/IndexQuery.java 9 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/IndexQueryFactoryImpl.java 5 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/OnDiskMergeImporter.java 32 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/PersistentCompressedSchema.java 8 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/RootContainer.java 7 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/State.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/SuccessiveAddsImportStrategy.java 1 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/SuffixContainer.java 11 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/TreePreloadComparator.java 8 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/package-info.java 5 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pdb/PDBBackend.java
@@ -23,7 +23,6 @@
 *
 *      Copyright 2015 ForgeRock AS
 */
package org.opends.server.backends.pdb;
import java.util.List;
@@ -35,9 +34,7 @@
import org.opends.server.backends.pluggable.spi.Storage;
import org.opends.server.core.ServerContext;
/**
 * Class defined in the configuration for this backend type.
 */
/** Class defined in the configuration for this backend type. */
public final class PDBBackend extends BackendImpl<PDBBackendCfg>
{
  @Override
opendj-server-legacy/src/main/java/org/opends/server/backends/pdb/PDBMonitor.java
@@ -23,7 +23,6 @@
 *
 *      Copyright 2015 ForgeRock AS
 */
package org.opends.server.backends.pdb;
import java.lang.reflect.Method;
opendj-server-legacy/src/main/java/org/opends/server/backends/pdb/PDBStorage.java
@@ -408,7 +408,6 @@
  /** Common interface for internal WriteableTransaction implementations. */
  private interface StorageImpl extends WriteableTransaction, Closeable {
  }
  /** PersistIt implementation of the {@link WriteableTransaction} interface. */
@@ -614,7 +613,6 @@
  /** PersistIt read-only implementation of {@link StorageImpl} interface. */
  private final class ReadOnlyStorageImpl implements StorageImpl {
    private final WriteableStorageImpl delegate;
    ReadOnlyStorageImpl(WriteableStorageImpl delegate)
@@ -777,7 +775,6 @@
    return dbCfg;
  }
  /** {@inheritDoc} */
  @Override
  public void close()
  {
@@ -812,7 +809,6 @@
    return dbCfg.getBufferPoolMap().get(BUFFER_SIZE);
  }
  /** {@inheritDoc} */
  @Override
  public void open(AccessMode accessMode) throws ConfigException, StorageRuntimeException
  {
@@ -856,7 +852,6 @@
        this);
  }
  /** {@inheritDoc} */
  @Override
  public <T> T read(final ReadOperation<T> operation) throws Exception
  {
@@ -897,7 +892,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public Importer startImport() throws ConfigException, StorageRuntimeException
  {
@@ -922,7 +916,6 @@
    return mangled.toString();
  }
  /** {@inheritDoc} */
  @Override
  public void write(final WriteOperation operation) throws Exception
  {
@@ -1013,7 +1006,7 @@
    public boolean accept(File file)
    {
      String name = file.getName();
      return name.equals(VOLUME_NAME) || name.matches(JOURNAL_NAME + "\\.\\d+$");
      return VOLUME_NAME.equals(name) || name.matches(JOURNAL_NAME + "\\.\\d+$");
    }
  };
@@ -1172,7 +1165,6 @@
    return null;
  }
  /** {@inheritDoc} */
  @Override
  public boolean isConfigurationChangeAcceptable(PDBBackendCfg newCfg,
      List<LocalizableMessage> unacceptableReasons)
@@ -1324,7 +1316,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public ConfigChangeResult applyConfigurationChange(PDBBackendCfg cfg)
  {
@@ -1423,7 +1414,6 @@
      logger.traceException(e);
      throw new StorageRuntimeException(ERR_REMOVE_FAIL.get(e.getMessage()).toString(), e);
    }
  }
  @Override
@@ -1432,7 +1422,6 @@
    return storageStatus;
  }
  /** {@inheritDoc} */
  @Override
  public void diskFullThresholdReached(File directory, long thresholdInBytes) {
    storageStatus = StorageStatus.unusable(
@@ -1440,7 +1429,6 @@
        thresholdInBytes, config.getBackendId()));
  }
  /** {@inheritDoc} */
  @Override
  public void diskLowThresholdReached(File directory, long thresholdInBytes) {
    storageStatus = StorageStatus.lockedDown(
@@ -1448,10 +1436,8 @@
        thresholdInBytes, config.getBackendId()));
  }
  /** {@inheritDoc} */
  @Override
  public void diskSpaceRestored(File directory, long lowThresholdInBytes, long fullThresholdInBytes) {
    storageStatus = StorageStatus.working();
  }
}
opendj-server-legacy/src/main/java/org/opends/server/backends/pdb/package-info.java
@@ -23,7 +23,6 @@
 *
 *      Copyright 2014-2015 ForgeRock AS
 */
/**
 * Contains the code for the Directory Server backend that uses Persistit
 * as the repository for storing entry and index information.
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AbstractTree.java
@@ -52,9 +52,7 @@
    open0(txn);
  }
  /**
   * Override in order to perform any additional initialization after the index has opened.
   */
  /** Override in order to perform any additional initialization after the index has opened. */
  void open0(WriteableTransaction txn) throws StorageRuntimeException
  {
    // Do nothing by default.
@@ -95,5 +93,4 @@
  {
    return name.compareTo(o.getName());
  }
}
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AttributeIndex.java
@@ -100,7 +100,6 @@
      this.indexType = indexType;
    }
    /** {@inheritDoc} */
    @Override
    public String toString()
    {
@@ -675,7 +674,6 @@
    return getName();
  }
  /** {@inheritDoc} */
  @Override
  public synchronized boolean isConfigurationChangeAcceptable(
      BackendIndexCfg cfg, List<LocalizableMessage> unacceptableReasons)
@@ -731,7 +729,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public synchronized ConfigChangeResult applyConfigurationChange(final BackendIndexCfg newConfiguration)
  {
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendMonitor.java
@@ -48,7 +48,6 @@
 */
class BackendMonitor extends MonitorProvider<MonitorProviderCfg>
{
  /** Represents the statistical information kept for each search filter. */
  private static class FilterStats implements Comparable<FilterStats>
  {
@@ -106,7 +105,6 @@
    this.rootContainer = rootContainer;
  }
  /** {@inheritDoc} */
  @Override
  public void initializeMonitorProvider(MonitorProviderCfg configuration)
       throws ConfigException, InitializationException
@@ -187,7 +185,6 @@
    return monitorAttrs;
  }
  /**
   * Updates the index filter statistics with this latest search filter
   * and the reason why an index was not used.
@@ -207,7 +204,6 @@
    {
      stats = filterToStats.get(searchFilter);
      if(stats != null)
      {
        stats.update(1, failureMessage);
@@ -242,7 +238,6 @@
    {
      stats = filterToStats.get(searchFilter);
      if(stats != null)
      {
        stats.update(1, matchingEntries);
@@ -299,9 +294,7 @@
    this.maxEntries = maxEntries;
  }
  /**
   * Updates the statistics counter to include an indexed search.
   */
  /** Updates the statistics counter to include an indexed search. */
  void updateIndexedSearchCount()
  {
    if (filterUseEnabled)
@@ -310,9 +303,7 @@
    }
  }
  /**
   * Updates the statistics counter to include an unindexed search.
   */
  /** Updates the statistics counter to include an unindexed search. */
  void updateUnindexedSearchCount()
  {
    if (filterUseEnabled)
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/CursorTransformer.java
@@ -50,9 +50,8 @@
 */
final class CursorTransformer<KI, VI, KO, VO> implements Cursor<KO, VO>
{
  /**
   * Allow to transform a cursor value given the key and the original value
   * Allow to transform a cursor value given the key and the original value.
   * @param <KI> Original type of the cursor's key
   * @param <VI> Original type of the cursor's value
   * @param <VO> New transformed type of the value
@@ -269,9 +268,7 @@
    }
  }
  /**
   * Runtime exception for problems happening during the transformation
   */
  /** Runtime exception for problems happening during the transformation. */
  @SuppressWarnings("serial")
  private static class TransformationException extends RuntimeException
  {
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DN2ID.java
@@ -293,7 +293,7 @@
    void endParent(V parent);
  }
  /** Perform dn2id cursoring to expose parent and children to the {@link TreeVisitor} */
  /** Perform dn2id cursoring to expose parent and children to the {@link TreeVisitor}. */
  private static final class TreeVisitorCursor<V> implements SequentialCursor<ByteString, ByteString>
  {
    private final SequentialCursor<ByteString, ByteString> delegate;
@@ -369,5 +369,4 @@
      delegate.close();
    }
  }
}
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DnKeyFormat.java
@@ -31,12 +31,9 @@
import org.forgerock.opendj.ldap.ByteStringBuilder;
import org.opends.server.types.DN;
/**
 * Handles the disk representation of LDAP data.
 */
/** Handles the disk representation of LDAP data. */
public class DnKeyFormat
{
  /** The format version used by this class to encode and decode a ByteString. */
  static final byte FORMAT_VERSION = 0x01;
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryContainer.java
@@ -400,7 +400,6 @@
      }
      return ccr;
    }
  }
  /** A read write lock to handle schema changes and bulk changes. */
@@ -1118,9 +1117,7 @@
        dn2uri.checkTargetForReferral(baseEntry, searchScope);
      }
      /*
       * The base entry is only included for whole subtree search.
       */
      /* The base entry is only included for whole subtree search. */
      if (searchScope == SearchScope.WHOLE_SUBTREE
          && searchOperation.getFilter().matchesEntry(baseEntry))
      {
@@ -2149,7 +2146,6 @@
            Cursor<ByteString, ByteString> cursor = txn.openCursor(dn2id.getName());
            try
            {
              // Step forward until we pass the ending value.
              boolean success = cursor.positionToKeyOrNext(suffix);
              while (success && cursor.getKey().compareTo(end) < 0)
@@ -2789,7 +2785,6 @@
    }
  }
  /**
   * Finds an existing entry whose DN is the closest ancestor of a given baseDN.
   *
@@ -2837,7 +2832,6 @@
    return false;
  }
  /**
   * Fetch the base Entry of the EntryContainer.
   * @param baseDN the DN for the base entry
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ExportJob.java
@@ -46,32 +46,21 @@
import static org.opends.messages.BackendMessages.*;
/**
 * Export a backend to LDIF.
 */
/** Export a backend to LDIF. */
class ExportJob
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /**
   * The requested LDIF export configuration.
   */
  /** The requested LDIF export configuration. */
  private final LDIFExportConfig exportConfig;
  /**
   * The number of milliseconds between job progress reports.
   */
  /** The number of milliseconds between job progress reports. */
  private final long progressInterval = 10000;
  /**
   * The current number of entries exported.
   */
  /** The current number of entries exported. */
  private long exportedCount;
  /**
   * The current number of entries skipped.
   */
  /** The current number of entries skipped. */
  private long skippedCount;
  /**
@@ -167,7 +156,6 @@
      timer.cancel();
    }
    long finishTime = System.currentTimeMillis();
    long totalTime = finishTime - startTime;
@@ -263,33 +251,22 @@
    }
  }
  /**
   * This class reports progress of the export job at fixed intervals.
   */
  /** This class reports progress of the export job at fixed intervals. */
  private class ProgressTask extends TimerTask
  {
    /**
     * The number of entries that had been exported at the time of the
     * previous progress report.
     */
    /** The number of entries that had been exported at the time of the previous progress report. */
    private long previousCount;
    /**
     * The time in milliseconds of the previous progress report.
     */
    /** The time in milliseconds of the previous progress report. */
    private long previousTime;
    /**
     * Create a new export progress task.
     */
    /** Create a new export progress task. */
    public ProgressTask()
    {
      previousTime = System.currentTimeMillis();
    }
    /**
     * The action to be performed by this timer task.
     */
    /** The action to be performed by this timer task. */
    @Override
    public void run()
    {
@@ -311,5 +288,4 @@
      previousTime = latestTime;
    }
  }
}
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Count.java
@@ -27,8 +27,8 @@
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.ByteStringBuilder;
import org.forgerock.util.Reject;
import org.forgerock.util.Function;
import org.forgerock.util.Reject;
import org.forgerock.util.promise.NeverThrowsException;
import org.opends.server.backends.pluggable.spi.Cursor;
import org.opends.server.backends.pluggable.spi.Importer;
@@ -175,11 +175,11 @@
    return counterValue;
  }
  private static final ByteSequence getKeyFromEntryID(EntryID entryID) {
  private static ByteSequence getKeyFromEntryID(EntryID entryID) {
    return new ByteStringBuilder(LONG_SIZE).appendCompactUnsigned(entryID.longValue());
  }
  private static final ByteSequence getKeyFromEntryIDAndBucket(EntryID entryID, long bucket) {
  private static ByteSequence getKeyFromEntryIDAndBucket(EntryID entryID, long bucket) {
    return new ByteStringBuilder(LONG_SIZE + LONG_SIZE).appendCompactUnsigned(entryID.longValue())
        .appendCompactUnsigned(bucket);
  }
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Entry.java
@@ -90,10 +90,7 @@
    return codec;
  }
  /**
   * A cached set of ByteStringBuilder buffers and ASN1Writer used to encode
   * entries.
   */
  /** A cached set of ByteStringBuilder buffers and ASN1Writer used to encode entries. */
  private static final class EntryCodec
  {
    /** The ASN1 tag for the ByteString type. */
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ImportRecord.java
@@ -29,12 +29,9 @@
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.opendj.ldap.ByteString;
/**
 * Record for import composed of a byte sequence key and an indexID.
 */
/** Record for import composed of a byte sequence key and an indexID. */
final class ImportRecord implements Comparable<ImportRecord>
{
  /**
   * The record overhead. In addition to entryID, key length and key bytes, the record overhead
   * includes the INS/DEL bit + indexID
@@ -145,7 +142,6 @@
    return result;
  }
  /** {@inheritDoc} */
  @Override
  public String toString()
  {
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/IndexBuffer.java
@@ -51,7 +51,6 @@
@SuppressWarnings("javadoc")
class IndexBuffer
{
  /** Internal interface for IndexBuffer implementor. */
  private interface IndexBufferImplementor
  {
@@ -74,7 +73,6 @@
   */
  private static final class DefaultIndexBuffer implements IndexBufferImplementor
  {
    /**
     * The buffered records stored as a map from the record key to the buffered value for that key for each index.
     * <p>
@@ -351,5 +349,4 @@
  {
    impl.remove(index, key, entryID);
  }
}
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/IndexFilter.java
@@ -52,9 +52,7 @@
   */
  private static final int FILTER_CANDIDATE_THRESHOLD = 10;
  /**
   * Limit on the number of entry IDs that may be retrieved by cursoring through an index.
   */
  /** Limit on the number of entry IDs that may be retrieved by cursoring through an index. */
  static final int CURSOR_ENTRY_LIMIT = 100000;
  /** The entry container holding the attribute indexes. */
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/IndexQuery.java
@@ -34,9 +34,7 @@
import org.forgerock.i18n.LocalizableMessageBuilder;
import org.forgerock.util.Utils;
/**
 * This class represents a Backend Query.
 */
/** This class represents a Backend Query. */
@org.opends.server.types.PublicAPI(
    stability = org.opends.server.types.StabilityLevel.VOLATILE,
    mayInstantiate = false,
@@ -115,10 +113,7 @@
    }
  }
  /**
   * This class creates an intersection IndexQuery from a collection of
   * IndexQuery objects.
   */
  /** This class creates an intersection IndexQuery from a collection of IndexQuery objects. */
  private static final class IntersectionIndexQuery extends IndexQuery
  {
    /** Collection of IndexQuery objects. */
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/IndexQueryFactoryImpl.java
@@ -72,7 +72,6 @@
    this.attributeIndex = attributeIndex;
  }
  /** {@inheritDoc} */
  @Override
  public IndexQuery createExactMatchQuery(final String indexID, final ByteSequence key)
  {
@@ -110,7 +109,6 @@
      };
  }
  /** {@inheritDoc} */
  @Override
  public IndexQuery createRangeMatchQuery(final String indexID, final ByteSequence lowerBound,
      final ByteSequence upperBound, final boolean includeLowerBound, final boolean includeUpperBound)
@@ -240,14 +238,12 @@
      };
  }
  /** {@inheritDoc} */
  @Override
  public IndexQuery createIntersectionQuery(Collection<IndexQuery> subqueries)
  {
    return IndexQuery.createIntersectionIndexQuery(subqueries);
  }
  /** {@inheritDoc} */
  @Override
  public IndexQuery createUnionQuery(Collection<IndexQuery> subqueries)
  {
@@ -312,7 +308,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public IndexingOptions getIndexingOptions()
  {
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/OnDiskMergeImporter.java
@@ -138,7 +138,6 @@
 */
final class OnDiskMergeImporter
{
  private static final String DEFAULT_TMP_DIR = "import-tmp";
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -190,7 +189,6 @@
      logger.info(NOTE_IMPORT_STARTING, DirectoryServer.getVersionString(), BUILD_ID, REVISION);
      logger.info(NOTE_IMPORT_THREAD_COUNT, threadCount);
      final long startTime = System.currentTimeMillis();
      final OnDiskMergeImporter importer;
      final ExecutorService sorter = Executors.newFixedThreadPool(
@@ -298,7 +296,7 @@
      logger.info(NOTE_REBUILD_FINAL_STATUS, importer.getImportedCount(), totalTime / 1000, rate);
    }
    private final static Set<String> selectIndexesToRebuild(EntryContainer entryContainer, RebuildConfig rebuildConfig,
    private static final Set<String> selectIndexesToRebuild(EntryContainer entryContainer, RebuildConfig rebuildConfig,
        long totalEntries)
    {
      final SelectIndexName selector = new SelectIndexName();
@@ -393,7 +391,7 @@
  /** Source of LDAP {@link Entry}s to process. */
  private interface Source
  {
    /** Process {@link Entry}s extracted from a {@link Source} */
    /** Process {@link Entry}s extracted from a {@link Source}. */
    interface EntryProcessor
    {
      void processEntry(EntryContainer container, EntryID entryID, Entry entry) throws Exception;
@@ -681,10 +679,9 @@
  private static final int MAX_BUFFER_SIZE = 2 * MB;
  /** Min size of phase one buffer. */
  private static final int MIN_BUFFER_SIZE = 4 * KB;
  /** DB cache size to use during import */
  /** DB cache size to use during import. */
  private static final int DB_CACHE_SIZE = 4 * MB;
  /** DB cache size to use during import */
  /** Required free memory for this importer */
  /** Required free memory for this importer. */
  private static final int REQUIRED_FREE_MEMORY = 50 * MB;
  /** LDIF reader. */
  /** Map of DNs to Suffix objects. */
@@ -867,7 +864,7 @@
          id2count, newCollector(entryContainer, id2count.getName()), dn2idAlreadyImported);
    }
    final static Callable<Void> newFlushTask(final Chunk chunk)
    static final Callable<Void> newFlushTask(final Chunk chunk)
    {
      return new Callable<Void>()
      {
@@ -1486,7 +1483,7 @@
          private Integer getOffsetAtPosition(int pos)
          {
            return (int) buffer.readInt(pos);
            return buffer.readInt(pos);
          }
          @Override
@@ -1533,7 +1530,7 @@
        bufferPool.release(buffer);
      }
      /** Cursor of the in-memory chunk */
      /** Cursor of the in-memory chunk. */
      private final class InMemorySortedChunkCursor implements MeteredCursor<ByteString, ByteString>
      {
        private ByteString key;
@@ -2445,7 +2442,7 @@
    return results;
  }
  /** Regularly report progress statistics from the registered list of {@link ProgressMetric} */
  /** Regularly report progress statistics from the registered list of {@link ProgressMetric}. */
  private static final class PhaseTwoProgressReporter implements Runnable, Closeable
  {
    private static final String PHASE2_REPORTER_THREAD_NAME = "PHASE2-REPORTER-%d";
@@ -2515,15 +2512,15 @@
  /** Buffer used by {@link InMemorySortedChunk} to store and sort data. */
  private interface Buffer extends Closeable
  {
    void writeInt(final int position, final int value);
    void writeInt(int position, int value);
    int readInt(final int position);
    int readInt(int position);
    long readCompactUnsignedLong(final int position);
    long readCompactUnsignedLong(int position);
    ByteString readByteString(int position, int length);
    int writeCompactUnsignedLong(final int position, long value);
    int writeCompactUnsignedLong(int position, long value);
    void writeByteSequence(int position, ByteSequence data);
@@ -3453,8 +3450,8 @@
    }
  }
  /** Adapter allowing to use an {@link Importer} as a {@link WriteableTransaction} */
  private final static class ImporterToWriteableTransactionAdapter implements WriteableTransaction
  /** Adapter allowing to use an {@link Importer} as a {@link WriteableTransaction}. */
  private static final class ImporterToWriteableTransactionAdapter implements WriteableTransaction
  {
    private final Importer importer;
@@ -3527,5 +3524,4 @@
      throw new UnsupportedOperationException();
    }
  }
}
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/PersistentCompressedSchema.java
@@ -77,8 +77,6 @@
  private final ByteStringBuilder storeObjectClassesWriterBuffer = new ByteStringBuilder();
  private final ASN1Writer storeObjectClassesWriter = ASN1.getWriter(storeObjectClassesWriterBuffer);
  /**
   * Creates a new instance of this compressed schema manager.
   *
@@ -101,7 +99,6 @@
    load(txn, accessMode.isWriteable());
  }
  /** {@inheritDoc} */
  @Override
  protected void storeAttribute(final byte[] encodedAttribute,
      final String attributeName, final Collection<String> attributeOptions)
@@ -125,9 +122,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  protected void storeObjectClasses(final byte[] encodedObjectClasses,
      final Collection<String> objectClassNames) throws DirectoryException
@@ -149,7 +143,6 @@
    }
  }
  private void load(WriteableTransaction txn, boolean shouldCreate)
      throws StorageRuntimeException, InitializationException
  {
@@ -239,5 +232,4 @@
          ERR_COMPSCHEMA_CANNOT_STORE_EX.get(e.getMessage()), e);
    }
  }
}
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/RootContainer.java
@@ -436,16 +436,12 @@
    return new EntryID(nextEntryID.getAndIncrement());
  }
  /**
   * Resets the next entry ID counter to zero. This should only be used after
   * clearing all trees.
   */
  /** Resets the next entry ID counter to zero. This should only be used after clearing all trees. */
  public void resetNextEntryID()
  {
    nextEntryID.set(1);
  }
  /** {@inheritDoc} */
  @Override
  public boolean isConfigurationChangeAcceptable(PluggableBackendCfg configuration,
      List<LocalizableMessage> unacceptableReasons)
@@ -454,7 +450,6 @@
    return true;
  }
  /** {@inheritDoc} */
  @Override
  public ConfigChangeResult applyConfigurationChange(PluggableBackendCfg configuration)
  {
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/State.java
@@ -48,7 +48,6 @@
 */
class State extends AbstractTree
{
  /**
   * Use COMPACTED serialization for new indexes.
   * @see {@link EntryIDSet.EntryIDSetCompactCodec}
@@ -64,9 +63,7 @@
  {
    TRUSTED(0x01),
    /**
     * Use compact encoding for indexes' ID storage.
     */
    /** Use compact encoding for indexes' ID storage. */
    COMPACTED(0x02);
    static final EnumSet<IndexFlag> ALL_FLAGS = EnumSet.allOf(IndexFlag.class);
@@ -159,7 +156,6 @@
    return ByteString.valueOf(new byte[] { value });
  }
  /**
   * Ensure that the specified flags are not set for the given index
   * @param txn a non null transaction
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/SuccessiveAddsImportStrategy.java
@@ -105,7 +105,6 @@
    this.backendCfg = backendCfg;
  }
  /** {@inheritDoc} */
  @Override
  public LDIFImportResult importLDIF(LDIFImportConfig importConfig) throws DirectoryException, IOException,
      CanceledOperationException, StorageRuntimeException, InterruptedException
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/SuffixContainer.java
@@ -36,11 +36,7 @@
 */
public interface SuffixContainer extends Closeable
{
  /**
   * The name of the index associating normalized DNs to ids. LDAP DNs uniquely
   * identify entries.
   */
  /** The name of the index associating normalized DNs to ids. LDAP DNs uniquely identify entries. */
  String DN2ID_INDEX_NAME = "dn2id";
  /** The name of the index associating normalized DNs to URIs. */
  String DN2URI_INDEX_NAME = "dn2uri";
@@ -55,10 +51,7 @@
   * its children, i.e. its immediate children.
   */
  String ID2CHILDREN_INDEX_NAME = "id2children";
  /**
   * The name of the index associating an entry id to the number of immediate
   * children below it.
   */
  /** The name of the index associating an entry id to the number of immediate children below it. */
  String ID2CHILDREN_COUNT_NAME = "id2childrencount";
  /**
   * The name of the index associating an entry id to the entry id set of all
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/TreePreloadComparator.java
@@ -28,13 +28,9 @@
import java.util.Comparator;
/**
 * This comparator is used to sort trees in order of priority
 * for preloading into the cache.
 */
/** This comparator is used to sort trees in order of priority for preloading into the cache. */
class TreePreloadComparator implements Comparator<Tree>
{
  /**
   * Calculate the relative priority of a tree for preloading.
   *
@@ -68,7 +64,7 @@
   * @return a negative integer, zero, or a positive integer as the
   *         first argument is less than, equal to, or greater than the
   *         second.
   **/
   */
  @Override
  public int compare(Tree tree1, Tree tree2)
  {
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/package-info.java
@@ -23,10 +23,7 @@
 *
 *      Copyright 2014 ForgeRock AS
 */
/**
 * Contains the code for implementing Directory Server pluggable storage backends.
 */
/** Contains the code for implementing Directory Server pluggable storage backends. */
@org.opends.server.types.PublicAPI(
     stability=org.opends.server.types.StabilityLevel.PRIVATE)
package org.opends.server.backends.pluggable;