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

Nicolas Capponi
24.31.2016 73d88be801a676244bd429e223d217c688291f02
OPENDJ-3417 Rename Backend to LocalBackend
76 files modified
1 files renamed
878 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/api/BackendInitializationListener.java 8 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/api/BackupTaskListener.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/api/ExportTaskListener.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/api/ImportTaskListener.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/api/LocalBackend.java 28 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/api/RestoreTaskListener.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/AciList.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/AciListenerManager.java 12 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/BackupBackend.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/ChangelogBackend.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/ConfigurationBackend.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/LDIFBackend.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/MemoryBackend.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/MonitorBackend.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/NullBackend.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/RootDSEBackend.java 38 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendStat.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/task/TaskBackend.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/BackendConfigManager.java 50 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/BaseDnRegistry.java 52 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/DirectoryServer.java 62 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/GroupManager.java 10 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/LockFileManager.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/SubentryManager.java 12 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/crypto/CryptoManagerImpl.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/crypto/CryptoManagerSync.java 10 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/extensions/DefaultEntryCache.java 10 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/extensions/ExactMatchIdentityMapper.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/extensions/FIFOEntryCache.java 8 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/extensions/FingerprintCertificateMapper.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/extensions/HasSubordinatesVirtualAttributeProvider.java 8 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/extensions/NumSubordinatesVirtualAttributeProvider.java 8 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/extensions/RegularExpressionIdentityMapper.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/extensions/SoftReferenceEntryCache.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/monitors/BackendMonitor.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/plugins/PasswordPolicyImportPlugin.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/plugins/ReferentialIntegrityPlugin.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/plugins/UniqueAttributePlugin.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java 26 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/MultimasterReplication.java 18 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tasks/BackupTask.java 18 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tasks/ExportTask.java 8 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tasks/ImportTask.java 18 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tasks/RebuildTask.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tasks/RestoreTask.java 10 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tasks/TaskUtils.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tools/BackUpDB.java 20 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tools/BackendToolUtils.java 8 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tools/ExportLDIF.java 12 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tools/ImportLDIF.java 12 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tools/RebuildIndex.java 20 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tools/RestoreDB.java 10 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tools/VerifyIndex.java 10 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendAddOperation.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendBindOperation.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendCompareOperation.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendDeleteOperation.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendModifyDNOperation.java 8 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendSearchOperation.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java 16 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java 8 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/api/TestTaskListener.java 16 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/backends/ChangelogBackendTestCase.java 16 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/backends/GenericBackendTestCase.java 60 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/backends/LDIFBackendTestCase.java 12 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/PluggableBackendImplTestCase.java 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/core/AddOperationTestCase.java 10 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/core/BackendConfigManagerTestCase.java 28 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/core/DeleteOperationTestCase.java 10 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/core/ModifyOperationTestCase.java 14 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/LDAPBinaryOptionTestCase.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/api/BackendInitializationListener.java
@@ -39,7 +39,7 @@
   * @param  backend  The backend that has been initialized and is
   *                  about to be put into service.
   */
  void performBackendPreInitializationProcessing(Backend<?> backend);
  void performBackendPreInitializationProcessing(LocalBackend<?> backend);
  /**
   * Performs any processing that may be required
@@ -50,7 +50,7 @@
   * @param  backend  The backend that has been initialized and has been
   *                  put into service.
   */
  void performBackendPostInitializationProcessing(Backend<?> backend);
  void performBackendPostInitializationProcessing(LocalBackend<?> backend);
  /**
   * Performs any processing that may be required before starting
@@ -59,7 +59,7 @@
   *
   * @param  backend  The backend that is about to be finalized.
   */
  void performBackendPreFinalizationProcessing(Backend<?> backend);
  void performBackendPreFinalizationProcessing(LocalBackend<?> backend);
  /**
   * Performs any processing that may be required whenever a backend
@@ -69,7 +69,7 @@
   * @param  backend  The backend that has been taken out of service
   *                  and is about to be finalized.
   */
  void performBackendPostFinalizationProcessing(Backend<?> backend);
  void performBackendPostFinalizationProcessing(LocalBackend<?> backend);
}
opendj-server-legacy/src/main/java/org/opends/server/api/BackupTaskListener.java
@@ -43,7 +43,7 @@
   * @param  config   Configuration information about the backup to be
   *                  performed.
   */
  void processBackupBegin(Backend<?> backend, BackupConfig config);
  void processBackupBegin(LocalBackend<?> backend, BackupConfig config);
  /**
   * Performs any processing that might be necessary after the server
@@ -57,5 +57,5 @@
   * @param  successful  Indicates whether the backup operation
   *                     completed successfully.
   */
  void processBackupEnd(Backend<?> backend, BackupConfig config, boolean successful);
  void processBackupEnd(LocalBackend<?> backend, BackupConfig config, boolean successful);
}
opendj-server-legacy/src/main/java/org/opends/server/api/ExportTaskListener.java
@@ -43,7 +43,7 @@
   * @param  config   Configuration information about the LDIF export
   *                  to be performed.
   */
  void processExportBegin(Backend<?> backend, LDIFExportConfig config);
  void processExportBegin(LocalBackend<?> backend, LDIFExportConfig config);
  /**
   * Performs any processing that might be necessary after the server
@@ -57,5 +57,5 @@
   * @param  successful  Indicates whether the export operation
   *                     completed successfully.
   */
  void processExportEnd(Backend<?> backend, LDIFExportConfig config, boolean successful);
  void processExportEnd(LocalBackend<?> backend, LDIFExportConfig config, boolean successful);
}
opendj-server-legacy/src/main/java/org/opends/server/api/ImportTaskListener.java
@@ -42,7 +42,7 @@
   * @param  config   Configuration information about the LDIF import
   *                  to be performed.
   */
  void processImportBegin(Backend<?> backend, LDIFImportConfig config);
  void processImportBegin(LocalBackend<?> backend, LDIFImportConfig config);
  /**
   * Performs any processing that might be necessary after the server
@@ -56,5 +56,5 @@
   * @param  successful  Indicates whether the import operation
   *                     completed successfully.
   */
  void processImportEnd(Backend<?> backend, LDIFImportConfig config, boolean successful);
  void processImportEnd(LocalBackend<?> backend, LDIFImportConfig config, boolean successful);
}
opendj-server-legacy/src/main/java/org/opends/server/api/LocalBackend.java
File was renamed from opendj-server-legacy/src/main/java/org/opends/server/api/Backend.java
@@ -73,20 +73,20 @@
     mayInstantiate=false,
     mayExtend=true,
     mayInvoke=false)
public abstract class Backend<C extends Configuration>
public abstract class LocalBackend<C extends Configuration>
// should have been BackendCfg instead of Configuration
{
  /**
   * The backend that holds a portion of the DIT that is hierarchically above
   * the information in this backend.
   */
  private Backend<?> parentBackend;
  private LocalBackend<?> parentBackend;
  /**
   * The set of backends that hold portions of the DIT that are hierarchically
   * below the information in this backend.
   */
  private Backend<?>[] subordinateBackends = new Backend[0];
  private LocalBackend<?>[] subordinateBackends = new LocalBackend[0];
  /** The backend monitor associated with this backend. */
  private BackendMonitor backendMonitor;
@@ -860,7 +860,7 @@
   * @return  The parent backend for this backend, or {@code null} if
   *          there is none.
   */
  public final Backend<?> getParentBackend()
  public final LocalBackend<?> getParentBackend()
  {
    return parentBackend;
  }
@@ -870,7 +870,7 @@
   *
   * @param  parentBackend  The parent backend for this backend.
   */
  public final synchronized void setParentBackend(Backend<?> parentBackend)
  public final synchronized void setParentBackend(LocalBackend<?> parentBackend)
  {
    this.parentBackend = parentBackend;
  }
@@ -881,7 +881,7 @@
   * @return  The set of subordinate backends for this backend, or an
   *          empty array if none exist.
   */
  public final Backend<?>[] getSubordinateBackends()
  public final LocalBackend<?>[] getSubordinateBackends()
  {
    return subordinateBackends;
  }
@@ -894,14 +894,14 @@
   *                             subordinate backends for this
   *                             backend.
   */
  public final synchronized void addSubordinateBackend(Backend<?> subordinateBackend)
  public final synchronized void addSubordinateBackend(LocalBackend<?> subordinateBackend)
  {
    LinkedHashSet<Backend<?>> backendSet = new LinkedHashSet<>();
    LinkedHashSet<LocalBackend<?>> backendSet = new LinkedHashSet<>();
    Collections.addAll(backendSet, subordinateBackends);
    if (backendSet.add(subordinateBackend))
    {
      subordinateBackends = backendSet.toArray(new Backend[backendSet.size()]);
      subordinateBackends = backendSet.toArray(new LocalBackend[backendSet.size()]);
    }
  }
@@ -913,12 +913,12 @@
   *                             subordinate backends for this
   *                             backend.
   */
  public final synchronized void removeSubordinateBackend(Backend<?> subordinateBackend)
  public final synchronized void removeSubordinateBackend(LocalBackend<?> subordinateBackend)
  {
    ArrayList<Backend<?>> backendList = new ArrayList<>(subordinateBackends.length);
    ArrayList<LocalBackend<?>> backendList = new ArrayList<>(subordinateBackends.length);
    boolean found = false;
    for (Backend<?> b : subordinateBackends)
    for (LocalBackend<?> b : subordinateBackends)
    {
      if (b.equals(subordinateBackend))
      {
@@ -932,7 +932,7 @@
    if (found)
    {
      subordinateBackends = backendList.toArray(new Backend[backendList.size()]);
      subordinateBackends = backendList.toArray(new LocalBackend[backendList.size()]);
    }
  }
@@ -952,7 +952,7 @@
    {
      if (entryDN.isSubordinateOrEqualTo(dn))
      {
        for (Backend<?> b : subordinateBackends)
        for (LocalBackend<?> b : subordinateBackends)
        {
          if (b.handlesEntry(entryDN))
          {
opendj-server-legacy/src/main/java/org/opends/server/api/RestoreTaskListener.java
@@ -42,7 +42,7 @@
   * @param  config   Configuration information about the restore to
   *                  be performed.
   */
  void processRestoreBegin(Backend<?> backend, RestoreConfig config);
  void processRestoreBegin(LocalBackend<?> backend, RestoreConfig config);
  /**
   * Performs any processing that might be necessary after the server
@@ -56,5 +56,5 @@
   * @param  successful  Indicates whether the restore operation
   *                     completed successfully.
   */
  void processRestoreEnd(Backend<?> backend, RestoreConfig config, boolean successful);
  void processRestoreEnd(LocalBackend<?> backend, RestoreConfig config, boolean successful);
}
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/AciList.java
@@ -32,7 +32,7 @@
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.DN;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.DITCacheMap;
import org.opends.server.types.Attribute;
import org.opends.server.types.Entry;
@@ -369,7 +369,7 @@
   * @param backend  The backend to check if each DN is handled by that
   * backend.
   */
  public void removeAci(Backend<?> backend) {
  public void removeAci(LocalBackend<?> backend) {
    lock.writeLock().lock();
    try
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/AciListenerManager.java
@@ -33,7 +33,7 @@
import org.forgerock.opendj.ldap.SearchScope;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.opends.server.api.AlertGenerator;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.BackendInitializationListener;
import org.opends.server.api.plugin.InternalDirectoryServerPlugin;
import org.opends.server.api.plugin.PluginResult;
@@ -309,7 +309,7 @@
    this.plugin = new AciChangeListenerPlugin();
    // Process ACI from already registered backends.
    for (Backend<?> backend : DirectoryServer.getBackends())
    for (LocalBackend<?> backend : DirectoryServer.getBackends())
    {
      performBackendPreInitializationProcessing(backend);
    }
@@ -337,7 +337,7 @@
   * that it may contain and add them to the ACI list.
   */
  @Override
  public void performBackendPreInitializationProcessing(Backend<?> backend)
  public void performBackendPreInitializationProcessing(LocalBackend<?> backend)
  {
    // Check to make sure that the backend has a presence index defined
    // for the ACI attribute. If it does not, then log a warning message
@@ -406,18 +406,18 @@
   * the provided backend.
   */
  @Override
  public void performBackendPostFinalizationProcessing(Backend<?> backend)
  public void performBackendPostFinalizationProcessing(LocalBackend<?> backend)
  {
    aciList.removeAci(backend);
  }
  @Override
  public void performBackendPostInitializationProcessing(Backend<?> backend) {
  public void performBackendPostInitializationProcessing(LocalBackend<?> backend) {
    // Nothing to do.
  }
  @Override
  public void performBackendPreFinalizationProcessing(Backend<?> backend) {
  public void performBackendPreFinalizationProcessing(LocalBackend<?> backend) {
    // nothing to do.
  }
opendj-server-legacy/src/main/java/org/opends/server/backends/BackupBackend.java
@@ -49,7 +49,7 @@
import org.forgerock.opendj.ldap.schema.CoreSchema;
import org.forgerock.opendj.ldap.schema.ObjectClass;
import org.forgerock.opendj.server.config.server.BackupBackendCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.core.AddOperation;
import org.opends.server.core.DeleteOperation;
import org.opends.server.core.DirectoryServer;
@@ -84,7 +84,7 @@
 * unknown backup directory is included in the base DN.
 */
public class BackupBackend
       extends Backend<BackupBackendCfg>
       extends LocalBackend<BackupBackendCfg>
       implements ConfigurationChangeListener<BackupBackendCfg>
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
opendj-server-legacy/src/main/java/org/opends/server/backends/ChangelogBackend.java
@@ -56,7 +56,7 @@
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.ldap.schema.CoreSchema;
import org.forgerock.opendj.ldap.schema.ObjectClass;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.controls.EntryChangelogNotificationControl;
import org.opends.server.controls.ExternalChangelogRequestControl;
import org.opends.server.core.AddOperation;
@@ -160,7 +160,7 @@
 *
 * @see ReplicationServer
 */
public class ChangelogBackend extends Backend<Configuration>
public class ChangelogBackend extends LocalBackend<Configuration>
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
opendj-server-legacy/src/main/java/org/opends/server/backends/ConfigurationBackend.java
@@ -42,7 +42,7 @@
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.server.config.meta.BackendCfgDefn.WritabilityMode;
import org.forgerock.opendj.server.config.server.BackendCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.Backupable;
import org.opends.server.api.ClientConnection;
import org.opends.server.backends.ConfigurationBackend.ConfigurationBackendCfg;
@@ -70,7 +70,7 @@
import org.opends.server.util.StaticUtils;
/** Back-end responsible for management of configuration entries. */
public class ConfigurationBackend extends Backend<ConfigurationBackendCfg> implements Backupable
public class ConfigurationBackend extends LocalBackend<ConfigurationBackendCfg> implements Backupable
{
  /**
   * Dummy {@link BackendCfg} implementation for the {@link ConfigurationBackend}. No config is
opendj-server-legacy/src/main/java/org/opends/server/backends/LDIFBackend.java
@@ -45,7 +45,7 @@
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.server.config.server.LDIFBackendCfg;
import org.opends.server.api.AlertGenerator;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.controls.SubtreeDeleteControl;
import org.opends.server.core.AddOperation;
import org.opends.server.core.DeleteOperation;
@@ -80,7 +80,7 @@
 * re-written on disk.
 */
public class LDIFBackend
       extends Backend<LDIFBackendCfg>
       extends LocalBackend<LDIFBackendCfg>
       implements ConfigurationChangeListener<LDIFBackendCfg>, AlertGenerator
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
opendj-server-legacy/src/main/java/org/opends/server/backends/MemoryBackend.java
@@ -38,7 +38,7 @@
import org.forgerock.opendj.ldap.SearchScope;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.server.config.server.MemoryBackendCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.controls.SubtreeDeleteControl;
import org.opends.server.core.AddOperation;
import org.opends.server.core.DeleteOperation;
@@ -92,7 +92,7 @@
 * entry has any children (which must not be the case for delete operations).
 */
public class MemoryBackend
       extends Backend<MemoryBackendCfg>
       extends LocalBackend<MemoryBackendCfg>
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
opendj-server-legacy/src/main/java/org/opends/server/backends/MonitorBackend.java
@@ -52,7 +52,7 @@
import org.forgerock.opendj.ldap.schema.ObjectClass;
import org.forgerock.opendj.server.config.server.MonitorBackendCfg;
import org.forgerock.util.Reject;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.MonitorData;
import org.opends.server.api.MonitorProvider;
import org.opends.server.core.AddOperation;
@@ -85,7 +85,7 @@
 * requested monitor and dynamically generate the associated entry. It will also
 * construct a base monitor entry with some useful server-wide data.
 */
public class MonitorBackend extends Backend<MonitorBackendCfg> implements
public class MonitorBackend extends LocalBackend<MonitorBackendCfg> implements
    ConfigurationChangeListener<MonitorBackendCfg>
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
opendj-server-legacy/src/main/java/org/opends/server/backends/NullBackend.java
@@ -37,7 +37,7 @@
import org.forgerock.opendj.ldap.schema.ObjectClass;
import org.forgerock.opendj.ldap.schema.SchemaBuilder;
import org.forgerock.opendj.server.config.server.BackendCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.controls.PagedResultsControl;
import org.opends.server.core.AddOperation;
import org.opends.server.core.DeleteOperation;
@@ -86,7 +86,7 @@
 * not represent a complete and stable API, should be considered private
 * and subject to change without notice.
 */
public class NullBackend extends Backend<BackendCfg>
public class NullBackend extends LocalBackend<BackendCfg>
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
opendj-server-legacy/src/main/java/org/opends/server/backends/RootDSEBackend.java
@@ -52,7 +52,7 @@
import org.forgerock.opendj.server.config.server.RootDSEBackendCfg;
import org.forgerock.util.Reject;
import org.forgerock.util.Utils;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.ClientConnection;
import org.opends.server.core.AddOperation;
import org.opends.server.core.DeleteOperation;
@@ -92,7 +92,7 @@
 * with the other backends.
 */
public class RootDSEBackend
       extends Backend<RootDSEBackendCfg>
       extends LocalBackend<RootDSEBackendCfg>
       implements ConfigurationChangeListener<RootDSEBackendCfg>
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -130,7 +130,7 @@
   * The set of subordinate base DNs and their associated backends that will be
   * used for non-base searches.
   */
  private ConcurrentHashMap<DN, Backend<?>> subordinateBaseDNs;
  private ConcurrentHashMap<DN, LocalBackend<?>> subordinateBaseDNs;
  /**
   * Creates a new backend with the provided information.  All backend
@@ -189,7 +189,7 @@
        subordinateBaseDNs = new ConcurrentHashMap<>();
        for (DN baseDN : subDNs)
        {
          Backend<?> backend = DirectoryServer.getBackend(baseDN);
          LocalBackend<?> backend = DirectoryServer.getBackend(baseDN);
          if (backend != null)
          {
            subordinateBaseDNs.put(baseDN, backend);
@@ -316,10 +316,10 @@
    }
    long count = 1;
    for (Map.Entry<DN, Backend<?>> entry : getSubordinateBaseDNs().entrySet())
    for (Map.Entry<DN, LocalBackend<?>> entry : getSubordinateBaseDNs().entrySet())
    {
      DN subBase = entry.getKey();
      Backend<?> b = entry.getValue();
      LocalBackend<?> b = entry.getValue();
      Entry subBaseEntry = b.getEntry(subBase);
      if (subBaseEntry != null)
      {
@@ -342,7 +342,7 @@
    long count = 0;
    for (Map.Entry<DN, Backend<?>> entry : getSubordinateBaseDNs().entrySet())
    for (Map.Entry<DN, LocalBackend<?>> entry : getSubordinateBaseDNs().entrySet())
    {
      DN subBase = entry.getKey();
      Entry subBaseEntry = entry.getValue().getEntry(subBase);
@@ -374,7 +374,7 @@
    // specified.
    if (subordinateBaseDNs != null)
    {
      for (Backend<?> b : subordinateBaseDNs.values())
      for (LocalBackend<?> b : subordinateBaseDNs.values())
      {
        if (b.handlesEntry(entryDN))
        {
@@ -410,7 +410,7 @@
    Map<AttributeType, List<Attribute>> dseUserAttrs = new HashMap<>();
    Map<AttributeType, List<Attribute>> dseOperationalAttrs = new HashMap<>();
    Map<DN, Backend<?>> publicNamingContexts = showSubordinatesNamingContexts ?
    Map<DN, LocalBackend<?>> publicNamingContexts = showSubordinatesNamingContexts ?
        DirectoryServer.getAllPublicNamingContexts() :
        DirectoryServer.getPublicNamingContexts();
    Attribute publicNamingContextAttr = createAttribute(ATTR_NAMING_CONTEXTS, publicNamingContexts.keySet());
@@ -570,12 +570,12 @@
    // If it was not the null DN, then iterate through the associated
    // subordinate backends to make the determination.
    for (Map.Entry<DN, Backend<?>> entry : getSubordinateBaseDNs().entrySet())
    for (Map.Entry<DN, LocalBackend<?>> entry : getSubordinateBaseDNs().entrySet())
    {
      DN baseDN = entry.getKey();
      if (entryDN.isSubordinateOrEqualTo(baseDN))
      {
        Backend<?> b = entry.getValue();
        LocalBackend<?> b = entry.getValue();
        if (b.entryExists(entryDN))
        {
          return true;
@@ -639,12 +639,12 @@
        break;
      case SINGLE_LEVEL:
        for (Map.Entry<DN, Backend<?>> entry : getSubordinateBaseDNs().entrySet())
        for (Map.Entry<DN, LocalBackend<?>> entry : getSubordinateBaseDNs().entrySet())
        {
          searchOperation.checkIfCanceled(false);
          DN subBase = entry.getKey();
          Backend<?> b = entry.getValue();
          LocalBackend<?> b = entry.getValue();
          Entry subBaseEntry = b.getEntry(subBase);
          if (subBaseEntry != null && filter.matchesEntry(subBaseEntry))
          {
@@ -657,12 +657,12 @@
      case SUBORDINATES:
        try
        {
          for (Map.Entry<DN, Backend<?>> entry : getSubordinateBaseDNs().entrySet())
          for (Map.Entry<DN, LocalBackend<?>> entry : getSubordinateBaseDNs().entrySet())
          {
            searchOperation.checkIfCanceled(false);
            DN subBase = entry.getKey();
            Backend<?> b = entry.getValue();
            LocalBackend<?> b = entry.getValue();
            searchOperation.setBaseDN(subBase);
            try
@@ -720,7 +720,7 @@
   * @return the subordinate base DNs of the root DSE
   */
  @SuppressWarnings({ "unchecked", "rawtypes" })
  public Map<DN, Backend<?>> getSubordinateBaseDNs()
  public Map<DN, LocalBackend<?>> getSubordinateBaseDNs()
  {
    if (subordinateBaseDNs != null)
    {
@@ -842,7 +842,7 @@
      {
        for (DN baseDN : subDNs)
        {
          Backend<?> backend = DirectoryServer.getBackend(baseDN);
          LocalBackend<?> backend = DirectoryServer.getBackend(baseDN);
          if (backend == null)
          {
            unacceptableReasons.add(WARN_ROOTDSE_NO_BACKEND_FOR_SUBORDINATE_BASE.get(baseDN));
@@ -869,7 +869,7 @@
    final ConfigChangeResult ccr = new ConfigChangeResult();
    // Check to see if we should apply a new set of base DNs.
    ConcurrentHashMap<DN, Backend<?>> subBases;
    ConcurrentHashMap<DN, LocalBackend<?>> subBases;
    try
    {
      Set<DN> subDNs = cfg.getSubordinateBaseDN();
@@ -883,7 +883,7 @@
        subBases = new ConcurrentHashMap<>();
        for (DN baseDN : subDNs)
        {
          Backend<?> backend = DirectoryServer.getBackend(baseDN);
          LocalBackend<?> backend = DirectoryServer.getBackend(baseDN);
          if (backend == null)
          {
            // This is not fine.  We can't use a suffix that doesn't exist.
opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java
@@ -70,7 +70,7 @@
import org.forgerock.opendj.server.config.server.SchemaBackendCfg;
import org.forgerock.util.Reject;
import org.opends.server.api.AlertGenerator;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.Backupable;
import org.opends.server.api.ClientConnection;
import org.opends.server.core.AddOperation;
@@ -109,7 +109,7 @@
 * It is a kind of meta-backend in that it doesn't actually hold any data but
 * rather dynamically generates the schema entry whenever it is requested.
 */
public class SchemaBackend extends Backend<SchemaBackendCfg>
public class SchemaBackend extends LocalBackend<SchemaBackendCfg>
     implements ConfigurationChangeListener<SchemaBackendCfg>, AlertGenerator, Backupable
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java
@@ -66,7 +66,7 @@
import org.forgerock.opendj.ldap.schema.ObjectClass;
import org.forgerock.opendj.server.config.server.TrustStoreBackendCfg;
import org.forgerock.util.Reject;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.core.AddOperation;
import org.opends.server.core.DeleteOperation;
import org.opends.server.core.DirectoryServer;
@@ -97,7 +97,7 @@
 * This class defines a backend used to provide an LDAP view of public keys
 * stored in a key store.
 */
public class TrustStoreBackend extends Backend<TrustStoreBackendCfg>
public class TrustStoreBackend extends LocalBackend<TrustStoreBackendCfg>
       implements ConfigurationChangeListener<TrustStoreBackendCfg>
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java
@@ -43,7 +43,7 @@
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.server.config.server.PluggableBackendCfg;
import org.forgerock.util.Reject;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.MonitorProvider;
import org.opends.server.backends.RebuildConfig;
import org.opends.server.backends.VerifyConfig;
@@ -83,7 +83,7 @@
 * @param <C>
 *          the type of the BackendCfg for the current backend
 */
public abstract class BackendImpl<C extends PluggableBackendCfg> extends Backend<C> implements
public abstract class BackendImpl<C extends PluggableBackendCfg> extends LocalBackend<C> implements
    ConfigurationChangeListener<PluggableBackendCfg>
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendStat.java
@@ -42,7 +42,7 @@
import org.forgerock.opendj.server.config.server.PluggableBackendCfg;
import org.forgerock.util.Option;
import org.forgerock.util.Options;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.backends.pluggable.spi.Cursor;
import org.opends.server.backends.pluggable.spi.ReadOperation;
import org.opends.server.backends.pluggable.spi.ReadableTransaction;
@@ -1432,7 +1432,7 @@
  private static Map<PluggableBackendCfg, BackendImpl<?>> getPluggableBackends()
  {
    List<Backend<?>> backendList = new ArrayList<>();
    List<LocalBackend<?>> backendList = new ArrayList<>();
    List<BackendCfg> entryList = new ArrayList<>();
    List<List<DN>> dnList = new ArrayList<>();
    BackendToolUtils.getBackends(backendList, entryList, dnList);
@@ -1440,7 +1440,7 @@
    final Map<PluggableBackendCfg, BackendImpl<?>> pluggableBackends = new LinkedHashMap<>();
    for (int i = 0; i < backendList.size(); i++)
    {
      Backend<?> backend = backendList.get(i);
      LocalBackend<?> backend = backendList.get(i);
      if (backend instanceof BackendImpl)
      {
        pluggableBackends.put((PluggableBackendCfg) entryList.get(i), (BackendImpl<?>) backend);
opendj-server-legacy/src/main/java/org/opends/server/backends/task/TaskBackend.java
@@ -46,7 +46,7 @@
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.server.config.server.TaskBackendCfg;
import org.forgerock.util.Reject;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.Backupable;
import org.opends.server.core.AddOperation;
import org.opends.server.core.DeleteOperation;
@@ -82,7 +82,7 @@
 * recurring basis.
 */
public class TaskBackend
       extends Backend<TaskBackendCfg>
       extends LocalBackend<TaskBackendCfg>
       implements ConfigurationChangeListener<TaskBackendCfg>, Backupable
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
opendj-server-legacy/src/main/java/org/opends/server/core/BackendConfigManager.java
@@ -40,7 +40,7 @@
import org.forgerock.opendj.server.config.meta.BackendCfgDefn;
import org.forgerock.opendj.server.config.server.BackendCfg;
import org.forgerock.opendj.server.config.server.RootCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.BackendInitializationListener;
import org.opends.server.backends.ConfigurationBackend;
import org.opends.server.config.ConfigConstants;
@@ -64,7 +64,7 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The mapping between configuration entry DNs and their corresponding backend implementations. */
  private final ConcurrentHashMap<DN, Backend<? extends BackendCfg>> registeredBackends = new ConcurrentHashMap<>();
  private final ConcurrentHashMap<DN, LocalBackend<? extends BackendCfg>> registeredBackends = new ConcurrentHashMap<>();
  private final ServerContext serverContext;
  /**
@@ -178,7 +178,7 @@
      // contain a valid backend implementation, then log an error and skip it.
      String className = backendCfg.getJavaClass();
      Backend<? extends BackendCfg> backend;
      LocalBackend<? extends BackendCfg> backend;
      try
      {
        backend = loadBackendClass(className).newInstance();
@@ -201,7 +201,7 @@
    initializeBackend(configBackend, configBackend.getBackendCfg());
  }
  private void initializeBackend(Backend<? extends BackendCfg> backend, BackendCfg backendCfg)
  private void initializeBackend(LocalBackend<? extends BackendCfg> backend, BackendCfg backendCfg)
  {
    ConfigChangeResult ccr = new ConfigChangeResult();
    initializeBackend(backend, backendCfg, ccr);
@@ -211,7 +211,7 @@
    }
  }
  private void initializeBackend(Backend<? extends BackendCfg> backend, BackendCfg backendCfg, ConfigChangeResult ccr)
  private void initializeBackend(LocalBackend<? extends BackendCfg> backend, BackendCfg backendCfg, ConfigChangeResult ccr)
  {
    backend.setBackendID(backendCfg.getBackendId());
    backend.setWritabilityMode(toWritabilityMode(backendCfg.getWritabilityMode()));
@@ -226,7 +226,7 @@
   * Acquire a shared lock on this backend. This will prevent operations like LDIF import or restore
   * from occurring while the backend is active.
   */
  private boolean acquireSharedLock(Backend<?> backend, String backendID, final ConfigChangeResult ccr)
  private boolean acquireSharedLock(LocalBackend<?> backend, String backendID, final ConfigChangeResult ccr)
  {
    try
    {
@@ -259,7 +259,7 @@
    ccr.addMessage(message);
  }
  private void releaseSharedLock(Backend<?> backend, String backendID)
  private void releaseSharedLock(LocalBackend<?> backend, String backendID)
  {
    try
    {
@@ -292,7 +292,7 @@
    // See if the backend is registered with the server.  If it is, then
    // see what's changed and whether those changes are acceptable.
    Backend<?> backend = registeredBackends.get(backendDN);
    LocalBackend<?> backend = registeredBackends.get(backendDN);
    if (backend != null)
    {
      LinkedHashSet<DN> removedDNs = new LinkedHashSet<>(backend.getBaseDNs());
@@ -349,14 +349,14 @@
      String className = configEntry.getJavaClass();
      try
      {
        Class<Backend<BackendCfg>> backendClass = loadBackendClass(className);
        if (! Backend.class.isAssignableFrom(backendClass))
        Class<LocalBackend<BackendCfg>> backendClass = loadBackendClass(className);
        if (! LocalBackend.class.isAssignableFrom(backendClass))
        {
          unacceptableReason.add(ERR_CONFIG_BACKEND_CLASS_NOT_BACKEND.get(className, backendDN));
          return false;
        }
        Backend<BackendCfg> b = backendClass.newInstance();
        LocalBackend<BackendCfg> b = backendClass.newInstance();
        if (! b.isConfigurationAcceptable(configEntry, unacceptableReason, serverContext))
        {
          return false;
@@ -381,7 +381,7 @@
  public ConfigChangeResult applyConfigurationChange(BackendCfg cfg)
  {
    DN backendDN = cfg.dn();
    Backend<? extends BackendCfg> backend = registeredBackends.get(backendDN);
    LocalBackend<? extends BackendCfg> backend = registeredBackends.get(backendDN);
    final ConfigChangeResult ccr = new ConfigChangeResult();
    // See if the entry contains an attribute that indicates whether the
@@ -438,7 +438,7 @@
      try
      {
        Class<?> backendClass = DirectoryServer.loadClass(className);
        if (Backend.class.isAssignableFrom(backendClass))
        if (LocalBackend.class.isAssignableFrom(backendClass))
        {
          // It appears to be a valid backend class.  We'll return that the
          // change is successful, but indicate that some administrative
@@ -494,7 +494,7 @@
    return ccr;
  }
  private boolean registerBackend(Backend<? extends BackendCfg> backend, BackendCfg backendCfg, ConfigChangeResult ccr)
  private boolean registerBackend(LocalBackend<? extends BackendCfg> backend, BackendCfg backendCfg, ConfigChangeResult ccr)
  {
    for (BackendInitializationListener listener : getBackendInitializationListeners())
    {
@@ -560,7 +560,7 @@
    // backend implementation, then log an error and skip it.
    String className = configEntry.getJavaClass();
    Backend<BackendCfg> backend;
    LocalBackend<BackendCfg> backend;
    try
    {
      backend = loadBackendClass(className).newInstance();
@@ -646,7 +646,7 @@
    // backend implementation, then log an error and skip it.
    String className = cfg.getJavaClass();
    Backend<? extends BackendCfg> backend;
    LocalBackend<? extends BackendCfg> backend;
    try
    {
      backend = loadBackendClass(className).newInstance();
@@ -665,7 +665,7 @@
    return ccr;
  }
  private boolean configureAndOpenBackend(Backend<?> backend, BackendCfg cfg, ConfigChangeResult ccr)
  private boolean configureAndOpenBackend(LocalBackend<?> backend, BackendCfg cfg, ConfigChangeResult ccr)
  {
    try
    {
@@ -686,16 +686,16 @@
  }
  @SuppressWarnings({ "unchecked", "rawtypes" })
  private void configureAndOpenBackend(Backend backend, BackendCfg cfg) throws ConfigException, InitializationException
  private void configureAndOpenBackend(LocalBackend backend, BackendCfg cfg) throws ConfigException, InitializationException
  {
    backend.configureBackend(cfg, serverContext);
    backend.openBackend();
  }
  @SuppressWarnings("unchecked")
  private Class<Backend<BackendCfg>> loadBackendClass(String className) throws Exception
  private Class<LocalBackend<BackendCfg>> loadBackendClass(String className) throws Exception
  {
    return (Class<Backend<BackendCfg>>) DirectoryServer.loadClass(className);
    return (Class<LocalBackend<BackendCfg>>) DirectoryServer.loadClass(className);
  }
  private WritabilityMode toWritabilityMode(BackendCfgDefn.WritabilityMode writabilityMode)
@@ -725,7 +725,7 @@
    // provided DN.  If not, then we don't care if the entry is deleted.  If we
    // do know about it, then that means that it is enabled and we will not
    // allow removing a backend that is enabled.
    Backend<?> backend = registeredBackends.get(backendDN);
    LocalBackend<?> backend = registeredBackends.get(backendDN);
    if (backend == null)
    {
      return true;
@@ -734,7 +734,7 @@
    // See if the backend has any subordinate backends.  If so, then it is not
    // acceptable to remove it.  Otherwise, it should be fine.
    Backend<?>[] subBackends = backend.getSubordinateBackends();
    LocalBackend<?>[] subBackends = backend.getSubordinateBackends();
    if (subBackends != null && subBackends.length != 0)
    {
      unacceptableReason.add(NOTE_CONFIG_BACKEND_CANNOT_REMOVE_BACKEND_WITH_SUBORDINATES.get(backendDN));
@@ -751,7 +751,7 @@
    // See if this backend config manager has a backend registered with the
    // provided DN.  If not, then we don't care if the entry is deleted.
    Backend<?> backend = registeredBackends.get(backendDN);
    LocalBackend<?> backend = registeredBackends.get(backendDN);
    if (backend == null)
    {
      return ccr;
@@ -759,7 +759,7 @@
    // See if the backend has any subordinate backends.  If so, then it is not
    // acceptable to remove it.  Otherwise, it should be fine.
    Backend<?>[] subBackends = backend.getSubordinateBackends();
    LocalBackend<?>[] subBackends = backend.getSubordinateBackends();
    if (subBackends != null && subBackends.length > 0)
    {
      ccr.setResultCode(UNWILLING_TO_PERFORM);
@@ -785,7 +785,7 @@
    return ccr;
  }
  private void deregisterBackend(DN backendDN, Backend<?> backend)
  private void deregisterBackend(DN backendDN, LocalBackend<?> backend)
  {
    for (BackendInitializationListener listener : getBackendInitializationListeners())
    {
opendj-server-legacy/src/main/java/org/opends/server/core/BaseDnRegistry.java
@@ -27,7 +27,7 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.ResultCode;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.types.DirectoryException;
/**
@@ -36,13 +36,13 @@
 */
public class BaseDnRegistry {
  /** The set of base DNs registered with the server. */
  private final TreeMap<DN, Backend<?>> baseDNs = new TreeMap<>();
  private final TreeMap<DN, LocalBackend<?>> baseDNs = new TreeMap<>();
  /** The set of private naming contexts registered with the server. */
  private final TreeMap<DN, Backend<?>> privateNamingContexts = new TreeMap<>();
  private final TreeMap<DN, LocalBackend<?>> privateNamingContexts = new TreeMap<>();
  /** The set of public naming contexts registered with the server. */
  private final TreeMap<DN, Backend<?>> publicNamingContexts = new TreeMap<>();
  private final TreeMap<DN, LocalBackend<?>> publicNamingContexts = new TreeMap<>();
  /** The set of public naming contexts, including sub-suffixes, registered with the server. */
  private final TreeMap<DN, Backend<?>> allPublicNamingContexts = new TreeMap<>();
  private final TreeMap<DN, LocalBackend<?>> allPublicNamingContexts = new TreeMap<>();
  /**
   * Indicates whether this base DN registry is in test mode.
@@ -62,11 +62,11 @@
   *         committed to the server
   * @throws DirectoryException if the base DN cannot be registered
   */
  public List<LocalizableMessage> registerBaseDN(DN baseDN, Backend<?> backend, boolean isPrivate)
  public List<LocalizableMessage> registerBaseDN(DN baseDN, LocalBackend<?> backend, boolean isPrivate)
      throws DirectoryException
  {
    // Check to see if the base DN is already registered with the server.
    Backend<?> existingBackend = baseDNs.get(baseDN);
    LocalBackend<?> existingBackend = baseDNs.get(baseDN);
    if (existingBackend != null)
    {
      LocalizableMessage message = ERR_REGISTER_BASEDN_ALREADY_EXISTS.
@@ -80,7 +80,7 @@
    LinkedList<DN> otherBaseDNs = new LinkedList<>();
    for (DN dn : baseDNs.keySet())
    {
      Backend<?> b = baseDNs.get(dn);
      LocalBackend<?> b = baseDNs.get(dn);
      if (b.equals(backend))
      {
        otherBaseDNs.add(dn);
@@ -97,7 +97,7 @@
    // Check to see if the new base DN is subordinate to any other base DN
    // already defined.  If it is, then any other base DN(s) for the same
    // backend must also be subordinate to the same base DN.
    final Backend<?> superiorBackend = getSuperiorBackend(baseDN, otherBaseDNs, backend.getBackendID());
    final LocalBackend<?> superiorBackend = getSuperiorBackend(baseDN, otherBaseDNs, backend.getBackendID());
    if (superiorBackend == null && backend.getParentBackend() != null)
    {
      LocalizableMessage message = ERR_REGISTER_BASEDN_NEW_BASE_NOT_SUBORDINATE.
@@ -107,11 +107,11 @@
    // Check to see if the new base DN should be the superior base DN for any
    // other base DN(s) already defined.
    LinkedList<Backend<?>> subordinateBackends = new LinkedList<>();
    LinkedList<LocalBackend<?>> subordinateBackends = new LinkedList<>();
    LinkedList<DN>      subordinateBaseDNs  = new LinkedList<>();
    for (DN dn : baseDNs.keySet())
    {
      Backend<?> b = baseDNs.get(dn);
      LocalBackend<?> b = baseDNs.get(dn);
      DN parentDN = dn.parent();
      while (parentDN != null)
      {
@@ -175,9 +175,9 @@
    if (!testOnly)
    {
      for (Backend<?> b : subordinateBackends)
      for (LocalBackend<?> b : subordinateBackends)
      {
        Backend<?> oldParentBackend = b.getParentBackend();
        LocalBackend<?> oldParentBackend = b.getParentBackend();
        if (oldParentBackend != null)
        {
          oldParentBackend.removeSubordinateBackend(b);
@@ -201,10 +201,10 @@
    return errors;
  }
  private Backend<?> getSuperiorBackend(DN baseDN, LinkedList<DN> otherBaseDNs, String backendID)
  private LocalBackend<?> getSuperiorBackend(DN baseDN, LinkedList<DN> otherBaseDNs, String backendID)
      throws DirectoryException
  {
    Backend<?> superiorBackend = null;
    LocalBackend<?> superiorBackend = null;
    DN parentDN = baseDN.parent();
    while (parentDN != null)
    {
@@ -244,7 +244,7 @@
    // Make sure that the Directory Server actually contains a backend with
    // the specified base DN.
    Backend<?> backend = baseDNs.get(baseDN);
    LocalBackend<?> backend = baseDNs.get(baseDN);
    if (backend == null)
    {
      LocalizableMessage message =
@@ -254,11 +254,11 @@
    // Check to see if the backend has a parent backend, and whether it has
    // any subordinates with base DNs that are below the base DN to remove.
    Backend<?>             superiorBackend     = backend.getParentBackend();
    LinkedList<Backend<?>> subordinateBackends = new LinkedList<>();
    LocalBackend<?>             superiorBackend     = backend.getParentBackend();
    LinkedList<LocalBackend<?>> subordinateBackends = new LinkedList<>();
    if (backend.getSubordinateBackends() != null)
    {
      for (Backend<?> b : backend.getSubordinateBackends())
      for (LocalBackend<?> b : backend.getSubordinateBackends())
      {
        for (DN dn : b.getBaseDNs())
        {
@@ -280,7 +280,7 @@
        continue;
      }
      Backend<?> b = baseDNs.get(dn);
      LocalBackend<?> b = baseDNs.get(dn);
      if (backend.equals(b))
      {
        otherBaseDNs.add(dn);
@@ -301,7 +301,7 @@
    {
      // If there were any subordinate backends, then all of their base DNs
      // will now be promoted to naming contexts.
      for (Backend<?> b : subordinateBackends)
      for (LocalBackend<?> b : subordinateBackends)
      {
        if (!testOnly)
        {
@@ -345,7 +345,7 @@
        if (!testOnly)
        {
          for (Backend<?> b : subordinateBackends)
          for (LocalBackend<?> b : subordinateBackends)
          {
            backend.removeSubordinateBackend(b);
            superiorBackend.addSubordinateBackend(b);
@@ -394,7 +394,7 @@
   *
   * @return mapping from base DN to backend
   */
  Map<DN, Backend<?>> getBaseDnMap()
  Map<DN, LocalBackend<?>> getBaseDnMap()
  {
    return this.baseDNs;
  }
@@ -405,7 +405,7 @@
   *
   * @return mapping from naming context to backend
   */
  Map<DN, Backend<?>> getPublicNamingContextsMap()
  Map<DN, LocalBackend<?>> getPublicNamingContextsMap()
  {
    return this.publicNamingContexts;
  }
@@ -416,7 +416,7 @@
   *
   * @return mapping from naming context to backend
   */
  Map<DN, Backend<?>> getAllPublicNamingContextsMap()
  Map<DN, LocalBackend<?>> getAllPublicNamingContextsMap()
  {
    return this.allPublicNamingContexts;
  }
@@ -427,7 +427,7 @@
   *
   * @return mapping from naming context to backend
   */
  Map<DN, Backend<?>> getPrivateNamingContextsMap()
  Map<DN, LocalBackend<?>> getPrivateNamingContextsMap()
  {
    return this.privateNamingContexts;
  }
opendj-server-legacy/src/main/java/org/opends/server/core/DirectoryServer.java
@@ -86,7 +86,7 @@
import org.opends.server.api.AlertGenerator;
import org.opends.server.api.AlertHandler;
import org.opends.server.api.AuthenticationPolicy;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.BackendInitializationListener;
import org.opends.server.api.BackupTaskListener;
import org.opends.server.api.CertificateMapper;
@@ -586,7 +586,7 @@
  private BaseDnRegistry baseDnRegistry;
  /** The set of backends registered with the server. */
  private TreeMap<String, Backend<?>> backends;
  private TreeMap<String, LocalBackend<?>> backends;
  /** The set of supported controls registered with the Directory Server. */
  private final TreeSet<String> supportedControls = newTreeSet(
@@ -1741,7 +1741,7 @@
    return directoryServer.compressedSchema;
  }
  private Backend<?> getConfigurationBackend()
  private LocalBackend<?> getConfigurationBackend()
  {
    return getBackend(ConfigurationBackend.CONFIG_BACKEND_ID);
  }
@@ -1829,7 +1829,7 @@
   *                              workflow conflicts with the workflow
   *                              ID of an existing workflow.
   */
  private static void createAndRegisterWorkflows(Backend<?> backend) throws DirectoryException
  private static void createAndRegisterWorkflows(LocalBackend<?> backend) throws DirectoryException
  {
    // Create a workflow for each backend base DN and register the workflow
    // with the default/internal/admin network group.
@@ -1848,7 +1848,7 @@
   *                              workflow conflicts with the workflow
   *                              ID of an existing workflow.
   */
  private static void createWorkflow(DN baseDN, Backend<?> backend) throws DirectoryException
  private static void createWorkflow(DN baseDN, LocalBackend<?> backend) throws DirectoryException
  {
    LocalBackendWorkflowElement.createAndRegister(baseDN, backend);
  }
@@ -3460,7 +3460,7 @@
   * @return  The set of backends that have been registered with the Directory
   *          Server.
   */
  public static Collection<Backend<?>> getBackends()
  public static Collection<LocalBackend<?>> getBackends()
  {
    return new ArrayList<>(directoryServer.backends.values());
  }
@@ -3473,7 +3473,7 @@
   * @return  The backend with the specified backend ID, or {@code null} if
   *          there is none.
   */
  public static Backend<?> getBackend(String backendID)
  public static LocalBackend<?> getBackend(String backendID)
  {
    return directoryServer.backends.get(backendID);
  }
@@ -3504,7 +3504,7 @@
   *                              conflicts with the backend ID of an existing
   *                              backend.
   */
  public static void registerBackend(Backend<?> backend) throws DirectoryException
  public static void registerBackend(LocalBackend<?> backend) throws DirectoryException
  {
    ifNull(backend);
@@ -3513,7 +3513,7 @@
    synchronized (directoryServer)
    {
      TreeMap<String, Backend<?>> newBackends = new TreeMap<>(directoryServer.backends);
      TreeMap<String, LocalBackend<?>> newBackends = new TreeMap<>(directoryServer.backends);
      if (newBackends.containsKey(backendID))
      {
        LocalizableMessage message = ERR_REGISTER_BACKEND_ALREADY_EXISTS.get(backendID);
@@ -3548,13 +3548,13 @@
   * @param  backend  The backend to deregister with the server.  It must not be
   *                  {@code null}.
   */
  public static void deregisterBackend(Backend<?> backend)
  public static void deregisterBackend(LocalBackend<?> backend)
  {
    ifNull(backend);
    synchronized (directoryServer)
    {
      TreeMap<String, Backend<?>> newBackends = new TreeMap<>(directoryServer.backends);
      TreeMap<String, LocalBackend<?>> newBackends = new TreeMap<>(directoryServer.backends);
      newBackends.remove(backend.getBackendID());
      directoryServer.backends = newBackends;
@@ -3584,7 +3584,7 @@
   * @return  The backend with the specified base DN, or {@code null} if there
   *          is no backend registered with the specified base DN.
   */
  public static Backend<?> getBackendWithBaseDN(DN baseDN)
  public static LocalBackend<?> getBackendWithBaseDN(DN baseDN)
  {
    return directoryServer.baseDnRegistry.getBaseDnMap().get(baseDN);
  }
@@ -3600,15 +3600,15 @@
   *          specified entry, or {@code null} if no appropriate backend is
   *          registered with the server.
   */
  public static Backend<?> getBackend(DN entryDN)
  public static LocalBackend<?> getBackend(DN entryDN)
  {
    if (entryDN.isRootDN())
    {
      return directoryServer.rootDSEBackend;
    }
    Map<DN, Backend<?>> baseDNs = directoryServer.baseDnRegistry.getBaseDnMap();
    Backend<?> b = baseDNs.get(entryDN);
    Map<DN, LocalBackend<?>> baseDNs = directoryServer.baseDnRegistry.getBaseDnMap();
    LocalBackend<?> b = baseDNs.get(entryDN);
    while (b == null)
    {
      entryDN = entryDN.parent();
@@ -3627,7 +3627,7 @@
   * Obtains a copy of the server's base DN registry.  The copy can be used
   * to test registration/deregistration of base DNs but cannot be used to
   * modify the backends.  To modify the server's live base DN to backend
   * mappings use {@link #registerBaseDN(DN, Backend, boolean)} and
   * mappings use {@link #registerBaseDN(DN, LocalBackend, boolean)} and
   * {@link #deregisterBaseDN(DN)}.
   *
   * @return copy of the base DN registry
@@ -3652,7 +3652,7 @@
   * @throws  DirectoryException  If a problem occurs while attempting to
   *                              register the provided base DN.
   */
  public static void registerBaseDN(DN baseDN, Backend<?> backend, boolean isPrivate)
  public static void registerBaseDN(DN baseDN, LocalBackend<?> backend, boolean isPrivate)
         throws DirectoryException
  {
    ifNull(baseDN, backend);
@@ -3720,7 +3720,7 @@
   *
   * @return  The set of public naming contexts defined in the Directory Server.
   */
  public static Map<DN, Backend<?>> getPublicNamingContexts()
  public static Map<DN, LocalBackend<?>> getPublicNamingContexts()
  {
    return directoryServer.baseDnRegistry.getPublicNamingContextsMap();
  }
@@ -3732,7 +3732,7 @@
   *
   * @return  The set of public naming contexts defined in the Directory Server.
   */
  public static Map<DN, Backend<?>> getAllPublicNamingContexts()
  public static Map<DN, LocalBackend<?>> getAllPublicNamingContexts()
  {
    return directoryServer.baseDnRegistry.getAllPublicNamingContextsMap();
  }
@@ -3744,7 +3744,7 @@
   * @return  The set of private naming contexts defined in the Directory
   *          Server.
   */
  public static Map<DN, Backend<?>> getPrivateNamingContexts()
  public static Map<DN, LocalBackend<?>> getPrivateNamingContexts()
  {
    return directoryServer.baseDnRegistry.getPrivateNamingContextsMap();
  }
@@ -3843,7 +3843,7 @@
    {
      return directoryServer.rootDSEBackend.getRootDSE();
    }
    final Backend<?> backend = getBackend(entryDN);
    final LocalBackend<?> backend = getBackend(entryDN);
    return backend != null ? backend.getEntry(entryDN) : null;
  }
@@ -3870,7 +3870,7 @@
    // Ask the appropriate backend if the entry exists.
    // If it is not appropriate for any backend, then return false.
    Backend<?> backend = getBackend(entryDN);
    LocalBackend<?> backend = getBackend(entryDN);
    return backend != null && backend.entryExists(entryDN);
  }
@@ -4682,7 +4682,7 @@
   * @param  backend  The backend in which the backup is to be performed.
   * @param  config   The configuration for the backup to be performed.
   */
  public static void notifyBackupBeginning(Backend<?> backend, BackupConfig config)
  public static void notifyBackupBeginning(LocalBackend<?> backend, BackupConfig config)
  {
    for (BackupTaskListener listener : directoryServer.backupTaskListeners)
    {
@@ -4705,7 +4705,7 @@
   * @param  config      The configuration for the backup that was performed.
   * @param  successful  Indicates whether the backup completed successfully.
   */
  public static void notifyBackupEnded(Backend<?> backend, BackupConfig config, boolean successful)
  public static void notifyBackupEnded(LocalBackend<?> backend, BackupConfig config, boolean successful)
  {
    for (BackupTaskListener listener : directoryServer.backupTaskListeners)
    {
@@ -4749,7 +4749,7 @@
   * @param  backend  The backend in which the restore is to be performed.
   * @param  config   The configuration for the restore to be performed.
   */
  public static void notifyRestoreBeginning(Backend<?> backend, RestoreConfig config)
  public static void notifyRestoreBeginning(LocalBackend<?> backend, RestoreConfig config)
  {
    for (RestoreTaskListener listener : directoryServer.restoreTaskListeners)
    {
@@ -4772,7 +4772,7 @@
   * @param  config      The configuration for the restore that was performed.
   * @param  successful  Indicates whether the restore completed successfully.
   */
  public static void notifyRestoreEnded(Backend<?> backend, RestoreConfig config, boolean successful)
  public static void notifyRestoreEnded(LocalBackend<?> backend, RestoreConfig config, boolean successful)
  {
    for (RestoreTaskListener listener : directoryServer.restoreTaskListeners)
    {
@@ -4817,7 +4817,7 @@
   * @param  backend  The backend in which the export is to be performed.
   * @param  config   The configuration for the export to be performed.
   */
  public static void notifyExportBeginning(Backend<?> backend, LDIFExportConfig config)
  public static void notifyExportBeginning(LocalBackend<?> backend, LDIFExportConfig config)
  {
    for (ExportTaskListener listener : directoryServer.exportTaskListeners)
    {
@@ -4840,7 +4840,7 @@
   * @param  config      The configuration for the export that was performed.
   * @param  successful  Indicates whether the export completed successfully.
   */
  public static void notifyExportEnded(Backend<?> backend, LDIFExportConfig config, boolean successful)
  public static void notifyExportEnded(LocalBackend<?> backend, LDIFExportConfig config, boolean successful)
  {
    for (ExportTaskListener listener : directoryServer.exportTaskListeners)
    {
@@ -4885,7 +4885,7 @@
   * @param  backend  The backend in which the import is to be performed.
   * @param  config   The configuration for the import to be performed.
   */
  public static void notifyImportBeginning(Backend<?> backend, LDIFImportConfig config)
  public static void notifyImportBeginning(LocalBackend<?> backend, LDIFImportConfig config)
  {
    for (ImportTaskListener listener : directoryServer.importTaskListeners)
    {
@@ -4908,7 +4908,7 @@
   * @param  config      The configuration for the import that was performed.
   * @param  successful  Indicates whether the import completed successfully.
   */
  public static void notifyImportEnded(Backend<?> backend, LDIFImportConfig config, boolean successful)
  public static void notifyImportEnded(LocalBackend<?> backend, LDIFImportConfig config, boolean successful)
  {
    for (ImportTaskListener listener : directoryServer.importTaskListeners)
    {
@@ -5218,7 +5218,7 @@
  /** Shutdown directory server backends. */
  public static void shutdownBackends()
  {
    for (Backend<?> backend : directoryServer.backends.values())
    for (LocalBackend<?> backend : directoryServer.backends.values())
    {
      try
      {
opendj-server-legacy/src/main/java/org/opends/server/core/GroupManager.java
@@ -49,7 +49,7 @@
import org.forgerock.opendj.server.config.meta.GroupImplementationCfgDefn;
import org.forgerock.opendj.server.config.server.GroupImplementationCfg;
import org.forgerock.opendj.server.config.server.RootCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.BackendInitializationListener;
import org.opends.server.api.DITCacheMap;
import org.opends.server.api.Group;
@@ -516,7 +516,7 @@
   * manager.
   */
  @Override
  public void performBackendPreInitializationProcessing(Backend<?> backend)
  public void performBackendPreInitializationProcessing(LocalBackend<?> backend)
  {
    InternalClientConnection conn = getRootConnection();
@@ -603,7 +603,7 @@
   * instances associated with entries in the provided backend.
   */
  @Override
  public void performBackendPostFinalizationProcessing(Backend<?> backend)
  public void performBackendPostFinalizationProcessing(LocalBackend<?> backend)
  {
    lock.writeLock().lock();
    try
@@ -626,12 +626,12 @@
  }
  @Override
  public void performBackendPostInitializationProcessing(Backend<?> backend) {
  public void performBackendPostInitializationProcessing(LocalBackend<?> backend) {
    // Nothing to do.
  }
  @Override
  public void performBackendPreFinalizationProcessing(Backend<?> backend) {
  public void performBackendPreFinalizationProcessing(LocalBackend<?> backend) {
    // Nothing to do.
  }
opendj-server-legacy/src/main/java/org/opends/server/core/LockFileManager.java
@@ -23,7 +23,7 @@
import java.util.HashMap;
import java.util.Map;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import static org.opends.messages.CoreMessages.*;
@@ -436,7 +436,7 @@
   * @return  The filename that should be used for the lock file for the
   *          specified backend.
   */
  public static String getBackendLockFileName(Backend backend)
  public static String getBackendLockFileName(LocalBackend backend)
  {
    StringBuilder buffer = new StringBuilder();
    buffer.append(getLockDirectoryPath());
opendj-server-legacy/src/main/java/org/opends/server/core/SubentryManager.java
@@ -33,7 +33,7 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.SearchScope;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.BackendInitializationListener;
import org.opends.server.api.ClientConnection;
import org.opends.server.api.DITCacheMap;
@@ -257,7 +257,7 @@
   * all subentries that it may contain and register them with this manager.
   */
  @Override
  public void performBackendPreInitializationProcessing(Backend<?> backend)
  public void performBackendPreInitializationProcessing(LocalBackend<?> backend)
  {
    InternalClientConnection conn = getRootConnection();
    SubentriesControl control = new SubentriesControl(true, true);
@@ -533,7 +533,7 @@
   * all subentries associated with the provided backend.
   */
  @Override
  public void performBackendPostFinalizationProcessing(Backend<?> backend)
  public void performBackendPostFinalizationProcessing(LocalBackend<?> backend)
  {
    lock.writeLock().lock();
    try
@@ -547,7 +547,7 @@
    }
  }
  private void performBackendPostFinalizationProcessing(Map<DN, List<SubEntry>> subEntryMap, Backend<?> backend)
  private void performBackendPostFinalizationProcessing(Map<DN, List<SubEntry>> subEntryMap, LocalBackend<?> backend)
  {
    Iterator<List<SubEntry>> subEntryListsIt = subEntryMap.values().iterator();
    while (subEntryListsIt.hasNext())
@@ -572,12 +572,12 @@
  }
  @Override
  public void performBackendPostInitializationProcessing(Backend<?> backend) {
  public void performBackendPostInitializationProcessing(LocalBackend<?> backend) {
    // Nothing to do.
  }
  @Override
  public void performBackendPreFinalizationProcessing(Backend<?> backend) {
  public void performBackendPreFinalizationProcessing(LocalBackend<?> backend) {
    // Nothing to do.
  }
opendj-server-legacy/src/main/java/org/opends/server/crypto/CryptoManagerImpl.java
@@ -80,7 +80,7 @@
import org.forgerock.opendj.server.config.server.CryptoManagerCfg;
import org.forgerock.util.Reject;
import org.opends.admin.ads.ADSContext;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.backends.TrustStoreBackend;
import org.opends.server.core.AddOperation;
import org.opends.server.core.DirectoryServer;
@@ -427,7 +427,7 @@
  private TrustStoreBackend getTrustStoreBackend()
       throws ConfigException
  {
    Backend<?> b = DirectoryServer.getBackend(ID_ADS_TRUST_STORE_BACKEND);
    LocalBackend<?> b = DirectoryServer.getBackend(ID_ADS_TRUST_STORE_BACKEND);
    if (b == null)
    {
      throw new ConfigException(ERR_CRYPTOMGR_ADS_TRUST_STORE_BACKEND_NOT_ENABLED.get(ID_ADS_TRUST_STORE_BACKEND));
opendj-server-legacy/src/main/java/org/opends/server/crypto/CryptoManagerSync.java
@@ -42,7 +42,7 @@
import org.forgerock.opendj.ldap.schema.CoreSchema;
import org.forgerock.opendj.ldap.schema.ObjectClass;
import org.opends.admin.ads.ADSContext;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.BackendInitializationListener;
import org.opends.server.api.plugin.InternalDirectoryServerPlugin;
import org.opends.server.api.plugin.PluginResult.PostResponse;
@@ -198,7 +198,7 @@
  }
  @Override
  public void performBackendPreInitializationProcessing(Backend<?> backend)
  public void performBackendPreInitializationProcessing(LocalBackend<?> backend)
  {
    for (DN baseDN : backend.getBaseDNs())
    {
@@ -210,18 +210,18 @@
  }
  @Override
  public void performBackendPostFinalizationProcessing(Backend<?> backend)
  public void performBackendPostFinalizationProcessing(LocalBackend<?> backend)
  {
    // No implementation required.
  }
  @Override
  public void performBackendPostInitializationProcessing(Backend<?> backend) {
  public void performBackendPostInitializationProcessing(LocalBackend<?> backend) {
    // Nothing to do.
  }
  @Override
  public void performBackendPreFinalizationProcessing(Backend<?> backend) {
  public void performBackendPreFinalizationProcessing(LocalBackend<?> backend) {
    // Nothing to do.
  }
opendj-server-legacy/src/main/java/org/opends/server/extensions/DefaultEntryCache.java
@@ -25,7 +25,7 @@
import org.forgerock.opendj.config.server.ConfigException;
import org.forgerock.opendj.config.server.ConfigurationChangeListener;
import org.forgerock.opendj.server.config.server.EntryCacheCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.BackendInitializationListener;
import org.opends.server.api.EntryCache;
import org.opends.server.api.MonitorData;
@@ -345,7 +345,7 @@
   *                  about to be put into service.
   */
  @Override
  public void performBackendPreInitializationProcessing(Backend<?> backend)
  public void performBackendPreInitializationProcessing(LocalBackend<?> backend)
  {
    // Do nothing.
  }
@@ -359,7 +359,7 @@
   *                  and is about to be finalized.
   */
  @Override
  public void performBackendPostFinalizationProcessing(Backend<?> backend)
  public void performBackendPostFinalizationProcessing(LocalBackend<?> backend)
  {
    // Do not clear any backends if the server is shutting down.
    if (!DirectoryServer.getInstance().isShuttingDown())
@@ -369,12 +369,12 @@
  }
  @Override
  public void performBackendPostInitializationProcessing(Backend<?> backend) {
  public void performBackendPostInitializationProcessing(LocalBackend<?> backend) {
    // Nothing to do.
  }
  @Override
  public void performBackendPreFinalizationProcessing(Backend<?> backend) {
  public void performBackendPreFinalizationProcessing(LocalBackend<?> backend) {
    // Nothing to do.
  }
}
opendj-server-legacy/src/main/java/org/opends/server/extensions/ExactMatchIdentityMapper.java
@@ -34,7 +34,7 @@
import org.forgerock.opendj.config.server.ConfigurationChangeListener;
import org.forgerock.opendj.server.config.server.ExactMatchIdentityMapperCfg;
import org.forgerock.opendj.server.config.server.IdentityMapperCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.IdentityMapper;
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.internal.InternalClientConnection;
@@ -111,7 +111,7 @@
    {
      for (DN baseDN : cfgBaseDNs)
      {
        Backend b = DirectoryServer.getBackend(baseDN);
        LocalBackend b = DirectoryServer.getBackend(baseDN);
        if (b != null && ! b.isIndexed(t, IndexType.EQUALITY))
        {
          throw new ConfigException(ERR_EXACTMAP_ATTR_UNINDEXED.get(
@@ -274,7 +274,7 @@
    {
      for (DN baseDN : cfgBaseDNs)
      {
        Backend b = DirectoryServer.getBackend(baseDN);
        LocalBackend b = DirectoryServer.getBackend(baseDN);
        if (b != null && ! b.isIndexed(t, IndexType.EQUALITY))
        {
          unacceptableReasons.add(ERR_EXACTMAP_ATTR_UNINDEXED.get(
opendj-server-legacy/src/main/java/org/opends/server/extensions/FIFOEntryCache.java
@@ -39,7 +39,7 @@
import org.forgerock.opendj.config.server.ConfigurationChangeListener;
import org.forgerock.opendj.server.config.server.EntryCacheCfg;
import org.forgerock.opendj.server.config.server.FIFOEntryCacheCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.EntryCache;
import org.opends.server.api.MonitorData;
import org.opends.server.core.DirectoryServer;
@@ -600,7 +600,7 @@
  {
    // Determine which backend should be used for the provided base DN.  If
    // there is none, then we don't need to do anything.
    Backend<?> backend = DirectoryServer.getBackend(baseDN);
    LocalBackend<?> backend = DirectoryServer.getBackend(baseDN);
    if (backend == null)
    {
      return;
@@ -635,7 +635,7 @@
   * @param  baseDN   The base DN below which all entries should be flushed.
   * @param  backend  The backend for which to remove the appropriate entries.
   */
  private void clearSubtree(DN baseDN, Backend<?> backend)
  private void clearSubtree(DN baseDN, LocalBackend<?> backend)
  {
    // See if there are any entries for the provided backend in the cache.  If
    // not, then return.
@@ -676,7 +676,7 @@
    // See if the backend has any subordinate backends.  If so, then process
    // them recursively.
    for (Backend<?> subBackend : backend.getSubordinateBackends())
    for (LocalBackend<?> subBackend : backend.getSubordinateBackends())
    {
      boolean isAppropriate = false;
      for (DN subBase : subBackend.getBaseDNs())
opendj-server-legacy/src/main/java/org/opends/server/extensions/FingerprintCertificateMapper.java
@@ -38,7 +38,7 @@
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.server.config.server.CertificateMapperCfg;
import org.forgerock.opendj.server.config.server.FingerprintCertificateMapperCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.CertificateMapper;
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.internal.InternalClientConnection;
@@ -118,7 +118,7 @@
    AttributeType t = configuration.getFingerprintAttribute();
    for (DN baseDN : cfgBaseDNs)
    {
      Backend<?> b = DirectoryServer.getBackend(baseDN);
      LocalBackend<?> b = DirectoryServer.getBackend(baseDN);
      if (b != null && ! b.isIndexed(t, IndexType.EQUALITY))
      {
        logger.warn(WARN_SATUACM_ATTR_UNINDEXED, configuration.dn(),
@@ -317,7 +317,7 @@
    AttributeType t = configuration.getFingerprintAttribute();
    for (DN baseDN : cfgBaseDNs)
    {
      Backend<?> b = DirectoryServer.getBackend(baseDN);
      LocalBackend<?> b = DirectoryServer.getBackend(baseDN);
      if (b != null && ! b.isIndexed(t, IndexType.EQUALITY))
      {
        LocalizableMessage message = WARN_SATUACM_ATTR_UNINDEXED.get(
opendj-server-legacy/src/main/java/org/opends/server/extensions/HasSubordinatesVirtualAttributeProvider.java
@@ -24,7 +24,7 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.server.config.server.HasSubordinatesVirtualAttributeCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.forgerock.opendj.ldap.schema.MatchingRule;
import org.opends.server.api.VirtualAttributeProvider;
import org.opends.server.core.DirectoryServer;
@@ -60,7 +60,7 @@
  @Override
  public Attribute getValues(Entry entry, VirtualAttributeRule rule)
  {
    Backend backend = DirectoryServer.getBackend(entry.getName());
    LocalBackend backend = DirectoryServer.getBackend(entry.getName());
    try
    {
@@ -81,7 +81,7 @@
  @Override
  public boolean hasValue(Entry entry, VirtualAttributeRule rule)
  {
    Backend backend = DirectoryServer.getBackend(entry.getName());
    LocalBackend backend = DirectoryServer.getBackend(entry.getName());
    try
    {
@@ -99,7 +99,7 @@
  @Override
  public boolean hasValue(Entry entry, VirtualAttributeRule rule, ByteString value)
  {
    Backend backend = DirectoryServer.getBackend(entry.getName());
    LocalBackend backend = DirectoryServer.getBackend(entry.getName());
    MatchingRule matchingRule =
        rule.getAttributeType().getEqualityMatchingRule();
opendj-server-legacy/src/main/java/org/opends/server/extensions/NumSubordinatesVirtualAttributeProvider.java
@@ -24,7 +24,7 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.server.config.server.NumSubordinatesVirtualAttributeCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.VirtualAttributeProvider;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.SearchOperation;
@@ -60,7 +60,7 @@
  @Override
  public Attribute getValues(Entry entry, VirtualAttributeRule rule)
  {
    Backend backend = DirectoryServer.getBackend(entry.getName());
    LocalBackend backend = DirectoryServer.getBackend(entry.getName());
    try
    {
@@ -81,7 +81,7 @@
  @Override
  public boolean hasValue(Entry entry, VirtualAttributeRule rule)
  {
    Backend<?> backend = DirectoryServer.getBackend(entry.getName());
    LocalBackend<?> backend = DirectoryServer.getBackend(entry.getName());
    try
    {
@@ -97,7 +97,7 @@
  @Override
  public boolean hasValue(Entry entry, VirtualAttributeRule rule, ByteString value)
  {
    Backend<?> backend = DirectoryServer.getBackend(entry.getName());
    LocalBackend<?> backend = DirectoryServer.getBackend(entry.getName());
    try
    {
      long count = backend.getNumberOfChildren(entry.getName());
opendj-server-legacy/src/main/java/org/opends/server/extensions/RegularExpressionIdentityMapper.java
@@ -42,7 +42,7 @@
import org.forgerock.opendj.config.server.ConfigurationChangeListener;
import org.forgerock.opendj.server.config.server.IdentityMapperCfg;
import org.forgerock.opendj.server.config.server.RegularExpressionIdentityMapperCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.IdentityMapper;
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.internal.InternalClientConnection;
@@ -138,7 +138,7 @@
    {
      for (DN baseDN : cfgBaseDNs)
      {
        Backend b = DirectoryServer.getBackend(baseDN);
        LocalBackend b = DirectoryServer.getBackend(baseDN);
        if (b != null && ! b.isIndexed(t, IndexType.EQUALITY))
        {
          throw new ConfigException(ERR_REGEXMAP_ATTR_UNINDEXED.get(
@@ -291,7 +291,7 @@
    {
      for (DN baseDN : cfgBaseDNs)
      {
        Backend b = DirectoryServer.getBackend(baseDN);
        LocalBackend b = DirectoryServer.getBackend(baseDN);
        if (b != null && ! b.isIndexed(t, IndexType.EQUALITY))
        {
          unacceptableReasons.add(ERR_REGEXMAP_ATTR_UNINDEXED.get(
opendj-server-legacy/src/main/java/org/opends/server/extensions/SoftReferenceEntryCache.java
@@ -36,7 +36,7 @@
import org.forgerock.opendj.config.server.ConfigurationChangeListener;
import org.forgerock.opendj.server.config.server.EntryCacheCfg;
import org.forgerock.opendj.server.config.server.SoftReferenceEntryCacheCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.DirectoryThread;
import org.opends.server.api.EntryCache;
import org.opends.server.api.MonitorData;
@@ -327,7 +327,7 @@
  public void clearSubtree(DN baseDN)
  {
    // Determine the backend used to hold the specified base DN and clear it.
    Backend<?> backend = DirectoryServer.getBackend(baseDN);
    LocalBackend<?> backend = DirectoryServer.getBackend(baseDN);
    if (backend == null)
    {
      // FIXME -- Should we clear everything just to be safe?
opendj-server-legacy/src/main/java/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java
@@ -48,7 +48,7 @@
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.server.config.server.CertificateMapperCfg;
import org.forgerock.opendj.server.config.server.SubjectAttributeToUserAttributeCertificateMapperCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.CertificateMapper;
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.internal.InternalClientConnection;
@@ -119,7 +119,7 @@
    {
      for (AttributeType t : attributeMap.values())
      {
        Backend<?> b = DirectoryServer.getBackend(baseDN);
        LocalBackend<?> b = DirectoryServer.getBackend(baseDN);
        if (b != null && ! b.isIndexed(t, IndexType.EQUALITY))
        {
          logger.warn(WARN_SATUACM_ATTR_UNINDEXED, configuration.dn(),
@@ -296,7 +296,7 @@
    {
      for (AttributeType t : newAttributeMap.values())
      {
        Backend<?> b = DirectoryServer.getBackend(baseDN);
        LocalBackend<?> b = DirectoryServer.getBackend(baseDN);
        if (b != null && !b.isIndexed(t, IndexType.EQUALITY))
        {
          LocalizableMessage message =
opendj-server-legacy/src/main/java/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java
@@ -37,7 +37,7 @@
import org.forgerock.opendj.config.server.ConfigurationChangeListener;
import org.forgerock.opendj.server.config.server.CertificateMapperCfg;
import org.forgerock.opendj.server.config.server.SubjectDNToUserAttributeCertificateMapperCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.CertificateMapper;
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.internal.InternalClientConnection;
@@ -105,7 +105,7 @@
    AttributeType t = configuration.getSubjectAttribute();
    for (DN baseDN : cfgBaseDNs)
    {
      Backend b = DirectoryServer.getBackend(baseDN);
      LocalBackend b = DirectoryServer.getBackend(baseDN);
      if (b != null && ! b.isIndexed(t, IndexType.EQUALITY))
      {
        logger.warn(WARN_SATUACM_ATTR_UNINDEXED, configuration.dn(),
opendj-server-legacy/src/main/java/org/opends/server/monitors/BackendMonitor.java
@@ -26,7 +26,7 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.schema.ObjectClass;
import org.forgerock.opendj.server.config.server.MonitorProviderCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.MonitorData;
import org.opends.server.api.MonitorProvider;
import org.opends.server.core.DirectoryServer;
@@ -40,7 +40,7 @@
       extends MonitorProvider<MonitorProviderCfg>
{
  /** The backend with which this monitor is associated. */
  private Backend<?> backend;
  private LocalBackend<?> backend;
  /** The name for this monitor. */
  private String monitorName;
@@ -53,7 +53,7 @@
   *
   * @param  backend  The backend with which this monitor is associated.
   */
  public BackendMonitor(Backend<?> backend)
  public BackendMonitor(LocalBackend<?> backend)
  {
    this.backend = backend;
  }
opendj-server-legacy/src/main/java/org/opends/server/plugins/PasswordPolicyImportPlugin.java
@@ -41,7 +41,7 @@
import org.forgerock.opendj.server.config.server.PasswordPolicyImportPluginCfg;
import org.forgerock.opendj.server.config.server.PluginCfg;
import org.opends.server.api.AuthenticationPolicy;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.ImportTaskListener;
import org.opends.server.api.PasswordStorageScheme;
import org.opends.server.api.plugin.DirectoryServerPlugin;
@@ -221,7 +221,7 @@
  }
  @Override
  public void processImportBegin(Backend<?> backend, LDIFImportConfig config)
  public void processImportBegin(LocalBackend<?> backend, LDIFImportConfig config)
  {
    // Find the set of attribute types with the auth password and user password
    // syntax defined in the schema.
@@ -269,7 +269,7 @@
  }
  @Override
  public void processImportEnd(Backend<?> backend, LDIFImportConfig config, boolean successful)
  public void processImportEnd(LocalBackend<?> backend, LDIFImportConfig config, boolean successful)
  {
    // No implementation is required.
  }
opendj-server-legacy/src/main/java/org/opends/server/plugins/ReferentialIntegrityPlugin.java
@@ -55,7 +55,7 @@
import org.forgerock.opendj.server.config.meta.ReferentialIntegrityPluginCfgDefn.CheckReferencesScopeCriteria;
import org.forgerock.opendj.server.config.server.PluginCfg;
import org.forgerock.opendj.server.config.server.ReferentialIntegrityPluginCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.DirectoryThread;
import org.opends.server.api.ServerShutdownListener;
import org.opends.server.api.plugin.DirectoryServerPlugin;
@@ -297,7 +297,7 @@
      for (DN baseDN : cfgBaseDNs)
      {
        Backend<?> b = DirectoryServer.getBackend(baseDN);
        LocalBackend<?> b = DirectoryServer.getBackend(baseDN);
        if (b != null && !b.isIndexed(type, IndexType.EQUALITY))
        {
          isAcceptable = false;
opendj-server-legacy/src/main/java/org/opends/server/plugins/UniqueAttributePlugin.java
@@ -40,7 +40,7 @@
import org.forgerock.opendj.server.config.server.PluginCfg;
import org.forgerock.opendj.server.config.server.UniqueAttributePluginCfg;
import org.opends.server.api.AlertGenerator;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.plugin.DirectoryServerPlugin;
import org.opends.server.api.plugin.PluginResult;
import org.opends.server.api.plugin.PluginResult.PostOperation;
@@ -158,7 +158,7 @@
    {
      for (DN baseDN : cfgBaseDNs)
      {
        Backend<?> b = DirectoryServer.getBackend(baseDN);
        LocalBackend<?> b = DirectoryServer.getBackend(baseDN);
        if (b != null && ! b.isIndexed(t, IndexType.EQUALITY))
        {
          throw new ConfigException(ERR_PLUGIN_UNIQUEATTR_ATTR_UNINDEXED.get(
@@ -690,7 +690,7 @@
    {
      for (DN baseDN : cfgBaseDNs)
      {
        Backend<?> b = DirectoryServer.getBackend(baseDN);
        LocalBackend<?> b = DirectoryServer.getBackend(baseDN);
        if (b != null && ! b.isIndexed(t, IndexType.EQUALITY))
        {
          unacceptableReasons.add(ERR_PLUGIN_UNIQUEATTR_ATTR_UNINDEXED.get(
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -78,8 +78,8 @@
import org.forgerock.opendj.server.config.server.ExternalChangelogDomainCfg;
import org.forgerock.opendj.server.config.server.ReplicationDomainCfg;
import org.opends.server.api.AlertGenerator;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.api.BackendInitializationListener;
import org.opends.server.api.DirectoryThread;
import org.opends.server.api.MonitorData;
@@ -254,17 +254,17 @@
  }
  @Override
  public void performBackendPreInitializationProcessing(Backend<?> backend) {
  public void performBackendPreInitializationProcessing(LocalBackend<?> backend) {
    // Nothing to do
  }
  @Override
  public void performBackendPostFinalizationProcessing(Backend<?> backend) {
  public void performBackendPostFinalizationProcessing(LocalBackend<?> backend) {
    // Nothing to do
  }
  @Override
  public void performBackendPostInitializationProcessing(Backend<?> backend) {
  public void performBackendPostInitializationProcessing(LocalBackend<?> backend) {
    if (!ignoreBackendInitializationEvent
            && getBackend().getBackendID().equals(backend.getBackendID())) {
      enable();
@@ -272,7 +272,7 @@
  }
  @Override
  public void performBackendPreFinalizationProcessing(Backend<?> backend) {
  public void performBackendPreFinalizationProcessing(LocalBackend<?> backend) {
    // Do not disable itself during a shutdown
    // And ignore the event if this replica is the event trigger (e.g. importing).
    if (!ignoreBackendInitializationEvent
@@ -555,7 +555,7 @@
    storeECLConfiguration(configuration);
    solveConflictFlag = isSolveConflict(configuration);
    Backend<?> backend = getBackend();
    LocalBackend<?> backend = getBackend();
    if (backend == null)
    {
      throw new ConfigException(ERR_SEARCHING_DOMAIN_BACKEND.get(getBaseDN()));
@@ -3382,7 +3382,7 @@
  private long exportBackend(OutputStream output, boolean checksumOutput)
      throws DirectoryException
  {
    Backend<?> backend = getBackend();
    LocalBackend<?> backend = getBackend();
    //  Acquire a shared lock for the backend.
    try
@@ -3509,7 +3509,7 @@
   * @throws DirectoryException
   *           If the backend could not be disabled or locked exclusively.
   */
  private void preBackendImport(Backend<?> backend) throws DirectoryException
  private void preBackendImport(LocalBackend<?> backend) throws DirectoryException
  {
    // Prevent the processing of the backend finalisation event as the import will disable the attached backend
    ignoreBackendInitializationEvent = true;
@@ -3537,7 +3537,7 @@
  @Override
  protected void importBackend(InputStream input) throws DirectoryException
  {
    Backend<?> backend = getBackend();
    LocalBackend<?> backend = getBackend();
    LDIFImportConfig importConfig = null;
    ImportExportContext ieCtx = getImportExportContext();
@@ -3621,7 +3621,7 @@
   * @param backend The backend implied in the import.
   * @exception DirectoryException Thrown when an error occurs.
   */
  private void closeBackendImport(Backend<?> backend) throws DirectoryException
  private void closeBackendImport(LocalBackend<?> backend) throws DirectoryException
  {
    String lockFile = LockFileManager.getBackendLockFileName(backend);
    StringBuilder failureReason = new StringBuilder();
@@ -3692,7 +3692,7 @@
   * Returns the backend associated to this domain.
   * @return The associated backend.
   */
  private Backend<?> getBackend()
  private LocalBackend<?> getBackend()
  {
    return DirectoryServer.getBackend(getBaseDN());
  }
@@ -4215,7 +4215,7 @@
  @Override
  public long countEntries() throws DirectoryException
  {
    Backend<?> backend = getBackend();
    LocalBackend<?> backend = getBackend();
    if (!backend.supports(BackendOperation.LDIF_EXPORT))
    {
      LocalizableMessage msg = ERR_INIT_EXPORT_NOT_SUPPORTED.get(backend.getBackendID());
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/MultimasterReplication.java
@@ -44,7 +44,7 @@
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.server.config.server.ReplicationDomainCfg;
import org.forgerock.opendj.server.config.server.ReplicationSynchronizationProviderCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.BackupTaskListener;
import org.opends.server.api.ExportTaskListener;
import org.opends.server.api.ImportTaskListener;
@@ -587,7 +587,7 @@
  }
  @Override
  public void processBackupBegin(Backend<?> backend, BackupConfig config)
  public void processBackupBegin(LocalBackend<?> backend, BackupConfig config)
  {
    for (DN dn : backend.getBaseDNs())
    {
@@ -600,7 +600,7 @@
  }
  @Override
  public void processBackupEnd(Backend<?> backend, BackupConfig config, boolean successful)
  public void processBackupEnd(LocalBackend<?> backend, BackupConfig config, boolean successful)
  {
    for (DN dn : backend.getBaseDNs())
    {
@@ -613,7 +613,7 @@
  }
  @Override
  public void processRestoreBegin(Backend<?> backend, RestoreConfig config)
  public void processRestoreBegin(LocalBackend<?> backend, RestoreConfig config)
  {
    for (DN dn : backend.getBaseDNs())
    {
@@ -626,7 +626,7 @@
  }
  @Override
  public void processRestoreEnd(Backend<?> backend, RestoreConfig config, boolean successful)
  public void processRestoreEnd(LocalBackend<?> backend, RestoreConfig config, boolean successful)
  {
    for (DN dn : backend.getBaseDNs())
    {
@@ -639,7 +639,7 @@
  }
  @Override
  public void processImportBegin(Backend<?> backend, LDIFImportConfig config)
  public void processImportBegin(LocalBackend<?> backend, LDIFImportConfig config)
  {
    for (DN dn : backend.getBaseDNs())
    {
@@ -652,7 +652,7 @@
  }
  @Override
  public void processImportEnd(Backend<?> backend, LDIFImportConfig config, boolean successful)
  public void processImportEnd(LocalBackend<?> backend, LDIFImportConfig config, boolean successful)
  {
    for (DN dn : backend.getBaseDNs())
    {
@@ -665,7 +665,7 @@
  }
  @Override
  public void processExportBegin(Backend<?> backend, LDIFExportConfig config)
  public void processExportBegin(LocalBackend<?> backend, LDIFExportConfig config)
  {
    for (DN dn : backend.getBaseDNs())
    {
@@ -678,7 +678,7 @@
  }
  @Override
  public void processExportEnd(Backend<?> backend, LDIFExportConfig config, boolean successful)
  public void processExportEnd(LocalBackend<?> backend, LDIFExportConfig config, boolean successful)
  {
    for (DN dn : backend.getBaseDNs())
    {
opendj-server-legacy/src/main/java/org/opends/server/tasks/BackupTask.java
@@ -40,8 +40,8 @@
import org.opends.messages.Severity;
import org.opends.messages.TaskMessages;
import org.forgerock.opendj.server.config.server.BackendCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.api.ClientConnection;
import org.opends.server.backends.task.Task;
import org.opends.server.backends.task.TaskState;
@@ -102,7 +102,7 @@
   */
  private Map<String,Entry> configEntries;
  private ArrayList<Backend<?>> backendsToArchive;
  private ArrayList<LocalBackend<?>> backendsToArchive;
  /** {@inheritDoc} */
  @Override
@@ -255,7 +255,7 @@
    {
      for (Map.Entry<String,Entry> mapEntry : configEntries.entrySet())
      {
        Backend<?> b = DirectoryServer.getBackend(mapEntry.getKey());
        LocalBackend<?> b = DirectoryServer.getBackend(mapEntry.getKey());
        if (b != null && b.supports(BackendOperation.BACKUP))
        {
          backendsToArchive.add(b);
@@ -268,7 +268,7 @@
      // be used.
      for (String id : backendIDList)
      {
        Backend<?> b = DirectoryServer.getBackend(id);
        LocalBackend<?> b = DirectoryServer.getBackend(id);
        if (b == null || configEntries.get(id) == null)
        {
          logger.error(ERR_BACKUPDB_NO_BACKENDS_FOR_ID, id);
@@ -309,7 +309,7 @@
   * @param backupLocation The backup directory.
   * @return true if the backend was successfully archived.
   */
  private boolean backupBackend(Backend<?> b, File backupLocation)
  private boolean backupBackend(LocalBackend<?> b, File backupLocation)
  {
    // Get the config entry for this backend.
    BackendCfg cfg = TaskUtils.getConfigEntry(b);
@@ -410,7 +410,7 @@
   * @param b The backend on which the lock is to be acquired.
   * @return true if the lock was successfully acquired.
   */
  private boolean lockBackend(Backend<?> b)
  private boolean lockBackend(LocalBackend<?> b)
  {
    try
    {
@@ -436,7 +436,7 @@
   * @param b The backend on which the lock is held.
   * @return true if the lock was successfully released.
   */
  private boolean unlockBackend(Backend<?> b)
  private boolean unlockBackend(LocalBackend<?> b)
  {
    try
    {
@@ -505,7 +505,7 @@
    // Iterate through the backends to archive and back them up individually.
    boolean errorsEncountered = false;
    for (Backend<?> b : backendsToArchive)
    for (LocalBackend<?> b : backendsToArchive)
    {
      if (isCancelled())
      {
opendj-server-legacy/src/main/java/org/opends/server/tasks/ExportTask.java
@@ -36,8 +36,8 @@
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.opends.messages.Severity;
import org.opends.messages.TaskMessages;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.api.ClientConnection;
import org.opends.server.backends.task.Task;
import org.opends.server.backends.task.TaskState;
@@ -261,7 +261,7 @@
    // Get the backend into which the LDIF should be imported.
    Backend<?> backend = DirectoryServer.getBackend(backendID);
    LocalBackend<?> backend = DirectoryServer.getBackend(backendID);
    if (backend == null)
    {
@@ -316,7 +316,7 @@
          return TaskState.STOPPED_BY_ERROR;
        }
        if (! Backend.handlesEntry(includeBranch, defaultIncludeBranches,
        if (! LocalBackend.handlesEntry(includeBranch, defaultIncludeBranches,
                                   excludeBranches))
        {
          logger.error(ERR_LDIFEXPORT_INVALID_INCLUDE_BASE, s, backendID);
opendj-server-legacy/src/main/java/org/opends/server/tasks/ImportTask.java
@@ -37,8 +37,8 @@
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.opends.messages.Severity;
import org.opends.messages.TaskMessages;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.api.ClientConnection;
import org.opends.server.backends.task.Task;
import org.opends.server.backends.task.TaskState;
@@ -214,7 +214,7 @@
      throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
    }
    Backend<?> backend = null;
    LocalBackend<?> backend = null;
    ArrayList<DN> defaultIncludeBranches;
    HashSet<DN> excludeBranches = new HashSet<>(excludeBranchStrings.size());
    HashSet<DN> includeBranches = new HashSet<>(includeBranchStrings.size());
@@ -299,7 +299,7 @@
      // Find the backend that includes all the branches.
      for(DN includeBranch : includeBranches)
      {
        Backend<?> locatedBackend = DirectoryServer.getBackend(includeBranch);
        LocalBackend<?> locatedBackend = DirectoryServer.getBackend(includeBranch);
        if(locatedBackend != null)
        {
          if(backend == null)
@@ -328,7 +328,7 @@
    for(DN includeBranch : includeBranches)
    {
      if (!Backend.handlesEntry(includeBranch, defaultIncludeBranches, excludeBranches))
      if (!LocalBackend.handlesEntry(includeBranch, defaultIncludeBranches, excludeBranches))
      {
        LocalizableMessage message = ERR_LDIFIMPORT_INVALID_INCLUDE_BASE.get(
            includeBranch, backend.getBackendID());
@@ -416,7 +416,7 @@
    }
    // Get the backend into which the LDIF should be imported.
    Backend<?> backend = null;
    LocalBackend<?> backend = null;
    HashSet<DN> defaultIncludeBranches;
    HashSet<DN> excludeBranches = new HashSet<>(excludeBranchStrings.size());
    HashSet<DN> includeBranches = new HashSet<>(includeBranchStrings.size());
@@ -457,7 +457,7 @@
      // Find the backend that includes all the branches.
      for(DN includeBranch : includeBranches)
      {
        Backend<?> locatedBackend = DirectoryServer.getBackend(includeBranch);
        LocalBackend<?> locatedBackend = DirectoryServer.getBackend(includeBranch);
        if(locatedBackend != null)
        {
          if(backend == null)
@@ -479,7 +479,7 @@
    if (backend.getSubordinateBackends() != null)
    {
      for (Backend<?> subBackend : backend.getSubordinateBackends())
      for (LocalBackend<?> subBackend : backend.getSubordinateBackends())
      {
        for (DN baseDN : subBackend.getBaseDNs())
        {
@@ -520,7 +520,7 @@
      // Make sure the selected backend will handle all the include branches
      for (DN includeBranch : includeBranches)
      {
        if (! Backend.handlesEntry(includeBranch, defaultIncludeBranches,
        if (! LocalBackend.handlesEntry(includeBranch, defaultIncludeBranches,
                                   excludeBranches))
        {
          logger.error(ERR_LDIFIMPORT_INVALID_INCLUDE_BASE, includeBranch, backend.getBackendID());
opendj-server-legacy/src/main/java/org/opends/server/tasks/RebuildTask.java
@@ -30,8 +30,8 @@
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.forgerock.opendj.ldap.ResultCode;
import org.opends.messages.TaskMessages;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.api.ClientConnection;
import org.opends.server.backends.RebuildConfig;
import org.opends.server.backends.RebuildConfig.RebuildMode;
@@ -166,7 +166,7 @@
    rebuildConfig.setTmpDirectory(tmpDirectory);
    rebuildConfig.setRebuildMode(rebuildMode);
    final Backend<?> backend = DirectoryServer.getBackendWithBaseDN(rebuildConfig.getBaseDN());
    final LocalBackend<?> backend = DirectoryServer.getBackendWithBaseDN(rebuildConfig.getBaseDN());
    if (backend == null)
    {
      logger.error(ERR_NO_BACKENDS_FOR_BASE, baseDN);
opendj-server-legacy/src/main/java/org/opends/server/tasks/RestoreTask.java
@@ -32,8 +32,8 @@
import org.forgerock.opendj.ldap.ResultCode;
import org.opends.messages.Severity;
import org.opends.messages.TaskMessages;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.api.ClientConnection;
import org.opends.server.backends.task.Task;
import org.opends.server.backends.task.TaskState;
@@ -136,7 +136,7 @@
   * @param backend The backend on which the lock is to be acquired.
   * @return true if the lock was successfully acquired.
   */
  private boolean lockBackend(Backend<?> backend)
  private boolean lockBackend(LocalBackend<?> backend)
  {
    try
    {
@@ -161,7 +161,7 @@
   * @param backend The backend on which the lock is held.
   * @return true if the lock was successfully released.
   */
  private boolean unlockBackend(Backend<?> backend)
  private boolean unlockBackend(LocalBackend<?> backend)
  {
    try
    {
@@ -261,7 +261,7 @@
    String backendID = TaskUtils.getBackendID(configEntry);
    Backend<?> backend = DirectoryServer.getBackend(backendID);
    LocalBackend<?> backend = DirectoryServer.getBackend(backendID);
    if (!backend.supports(BackendOperation.RESTORE))
    {
      logger.error(ERR_RESTOREDB_CANNOT_RESTORE, backend.getBackendID());
opendj-server-legacy/src/main/java/org/opends/server/tasks/TaskUtils.java
@@ -32,7 +32,7 @@
import org.forgerock.opendj.ldap.requests.ModifyRequest;
import org.forgerock.opendj.server.config.server.BackendCfg;
import org.forgerock.opendj.server.config.server.RootCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.types.Entry;
import org.opends.server.config.ConfigurationHandler;
import org.opends.server.core.DirectoryServer;
@@ -144,7 +144,7 @@
   * @return The configuration entry of the backend, or null if it could not
   * be found.
   */
  public static BackendCfg getConfigEntry(Backend<?> backend)
  public static BackendCfg getConfigEntry(LocalBackend<?> backend)
  {
    try
    {
opendj-server-legacy/src/main/java/org/opends/server/tools/BackUpDB.java
@@ -41,8 +41,8 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.server.config.server.BackendCfg;
import org.forgerock.util.Utils;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.LockFileManager;
import org.opends.server.loggers.JDKLogging;
@@ -429,20 +429,20 @@
    // Get information about the backends defined in the server, and determine
    // whether we are backing up multiple backends or a single backend.
    List<Backend<?>> backendList = new ArrayList<>();
    List<LocalBackend<?>> backendList = new ArrayList<>();
    List<BackendCfg> entryList = new ArrayList<>();
    List<List<DN>> dnList = new ArrayList<>();
    BackendToolUtils.getBackends(backendList, entryList, dnList);
    int numBackends = backendList.size();
    boolean multiple;
    List<Backend<?>> backendsToArchive = new ArrayList<>(numBackends);
    List<LocalBackend<?>> backendsToArchive = new ArrayList<>(numBackends);
    Map<String, BackendCfg> configEntries = new HashMap<>(numBackends);
    if (backUpAll.isPresent())
    {
      for (int i=0; i < numBackends; i++)
      {
        Backend<?> b = backendList.get(i);
        LocalBackend<?> b = backendList.get(i);
        if (b.supports(BackendOperation.BACKUP))
        {
          backendsToArchive.add(b);
@@ -460,7 +460,7 @@
      HashSet<String> requestedBackends = new HashSet<>(backendID.getValues());
      for (int i=0; i < numBackends; i++)
      {
        Backend<?> b = backendList.get(i);
        LocalBackend<?> b = backendList.get(i);
        if (requestedBackends.contains(b.getBackendID()))
        {
          if (b.supports(BackendOperation.BACKUP))
@@ -499,7 +499,7 @@
    // Iterate through the backends to archive and back them up individually.
    boolean errorsEncountered = false;
    for (Backend<?> b : backendsToArchive)
    for (LocalBackend<?> b : backendsToArchive)
    {
      if (!acquireSharedLock(b))
      {
@@ -635,7 +635,7 @@
    return 0;
  }
  private boolean acquireSharedLock(Backend<?> b)
  private boolean acquireSharedLock(LocalBackend<?> b)
  {
    try
    {
@@ -655,7 +655,7 @@
    }
  }
  private boolean releaseSharedLock(Backend<?> b)
  private boolean releaseSharedLock(LocalBackend<?> b)
  {
    try
    {
@@ -675,7 +675,7 @@
    }
  }
  private void unlockBackend(Backend<?> b)
  private void unlockBackend(LocalBackend<?> b)
  {
    try
    {
opendj-server-legacy/src/main/java/org/opends/server/tools/BackendToolUtils.java
@@ -26,7 +26,7 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.server.config.server.BackendCfg;
import org.forgerock.opendj.server.config.server.RootCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.config.ConfigurationHandler;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.Attribute;
@@ -60,7 +60,7 @@
   * @return 0 if everything went fine. 1 if an error occurred.
   */
  @SuppressWarnings({ "unchecked", "rawtypes" })
  public static int getBackends(final List<Backend<?>> backendList, final List<BackendCfg> entryList,
  public static int getBackends(final List<LocalBackend<?>> backendList, final List<BackendCfg> entryList,
      final List<List<DN>> dnList)
  {
    try
@@ -80,11 +80,11 @@
        }
        final Class<?> backendClass = getBackendClass(backendClassName, configEntry);
        final Backend backend;
        final LocalBackend backend;
        final BackendCfg cfg;
        try
        {
          backend = (Backend) backendClass.newInstance();
          backend = (LocalBackend) backendClass.newInstance();
          backend.setBackendID(backendID);
          cfg = root.getBackend(backendID);
          backend.configureBackend(cfg, DirectoryServer.getInstance().getServerContext());
opendj-server-legacy/src/main/java/org/opends/server/tools/ExportLDIF.java
@@ -34,8 +34,8 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.server.config.server.BackendCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.api.plugin.PluginType;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.LockFileManager;
@@ -430,12 +430,12 @@
    // through them, finding the one backend that should be used for the export,
    // and also finding backends with subordinate base DNs that should be
    // excluded from the export.
    Backend<?>    backend                = null;
    LocalBackend<?>    backend                = null;
    List<DN>      baseDNList             = null;
    List<DN>      defaultIncludeBranches = null;
    ArrayList<DN> excludeBranches        = null;
    List<Backend<?>> backendList = new ArrayList<>();
    List<LocalBackend<?>> backendList = new ArrayList<>();
    List<BackendCfg> entryList = new ArrayList<>();
    List<List<DN>> dnList = new ArrayList<>();
    BackendToolUtils.getBackends(backendList, entryList, dnList);
@@ -443,7 +443,7 @@
    int numBackends = backendList.size();
    for (int i=0; i < numBackends; i++)
    {
      Backend<?> b = backendList.get(i);
      LocalBackend<?> b = backendList.get(i);
      if (! backendID.getValue().equals(b.getBackendID()))
      {
        continue;
@@ -514,7 +514,7 @@
          return 1;
        }
        if (! Backend.handlesEntry(includeBranch, defaultIncludeBranches,
        if (! LocalBackend.handlesEntry(includeBranch, defaultIncludeBranches,
                                   excludeBranches))
        {
          logger.error(ERR_LDIFEXPORT_INVALID_INCLUDE_BASE, s, backendID.getValue());
opendj-server-legacy/src/main/java/org/opends/server/tools/ImportLDIF.java
@@ -37,8 +37,8 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.server.config.server.BackendCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.api.plugin.PluginType;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.DirectoryServer.InitializationBuilder;
@@ -585,7 +585,7 @@
    // through them, finding the one backend into which the LDIF should be
    // imported and finding backends with subordinate base DNs that should be
    // excluded from the import.
    Backend<?> backend = null;
    LocalBackend<?> backend = null;
    Set<DN> defaultIncludeBranches = null;
    Set<DN> excludeBranches = new HashSet<>();
    Set<DN> includeBranches = new HashSet<>();
@@ -609,7 +609,7 @@
      }
    }
    ArrayList<Backend<?>> backendList = new ArrayList<>();
    ArrayList<LocalBackend<?>> backendList = new ArrayList<>();
    ArrayList<BackendCfg> entryList = new ArrayList<>();
    ArrayList<List<DN>> dnList = new ArrayList<>();
    int code = BackendToolUtils.getBackends(backendList, entryList, dnList);
@@ -621,7 +621,7 @@
    int numBackends = backendList.size();
    for (int i=0; i < numBackends; i++)
    {
      Backend<?> b = backendList.get(i);
      LocalBackend<?> b = backendList.get(i);
      if(backendID.isPresent())
      {
@@ -701,7 +701,7 @@
      // Make sure the selected backend will handle all the include branches
      for(DN includeBranch : includeBranches)
      {
        if (! Backend.handlesEntry(includeBranch, defaultIncludeBranches,
        if (! LocalBackend.handlesEntry(includeBranch, defaultIncludeBranches,
                                   excludeBranches))
        {
          logger.error(ERR_LDIFIMPORT_INVALID_INCLUDE_BASE, includeBranch, backendID.getValue());
opendj-server-legacy/src/main/java/org/opends/server/tools/RebuildIndex.java
@@ -33,8 +33,8 @@
import org.forgerock.opendj.config.server.ConfigException;
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.server.config.server.BackendCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.backends.RebuildConfig;
import org.opends.server.backends.RebuildConfig.RebuildMode;
import org.opends.server.core.DirectoryServer;
@@ -77,7 +77,7 @@
      INFO_REBUILDINDEX_TOOL_DESCRIPTION.get());
  private RebuildConfig rebuildConfig = new RebuildConfig();
  private Backend<?> currentBackend;
  private LocalBackend<?> currentBackend;
  /**
   * Processes the command-line arguments and invokes the rebuild process.
@@ -410,7 +410,7 @@
   *          process.
   * @return An integer representing the result of the process.
   */
  private int rebuildIndex(final Backend<?> backend, final RebuildConfig rebuildConfig)
  private int rebuildIndex(final LocalBackend<?> backend, final RebuildConfig rebuildConfig)
  {
    // Acquire an exclusive lock for the backend.
    //TODO: Find a way to do this with the server online.
@@ -479,18 +479,18 @@
   * @throws Exception
   *           If an exception occurred during the backend search.
   */
  private Backend<?> retrieveBackend(final DN selectedDN) throws ConfigException, Exception
  private LocalBackend<?> retrieveBackend(final DN selectedDN) throws ConfigException, Exception
  {
    final List<Backend<?>> backendList = new ArrayList<>();
    final List<LocalBackend<?>> backendList = new ArrayList<>();
    final List<BackendCfg> entryList = new ArrayList<>();
    final List<List<DN>> dnList = new ArrayList<>();
    BackendToolUtils.getBackends(backendList, entryList, dnList);
    Backend<?> backend = null;
    LocalBackend<?> backend = null;
    final int numBackends = backendList.size();
    for (int i = 0; i < numBackends; i++)
    {
      final Backend<?> b = backendList.get(i);
      final LocalBackend<?> b = backendList.get(i);
      final List<DN> baseDNs = dnList.get(i);
      if (baseDNs.contains(selectedDN))
      {
@@ -682,7 +682,7 @@
   *
   * @return The current backend.
   */
  public Backend<?> getCurrentBackend()
  public LocalBackend<?> getCurrentBackend()
  {
    return currentBackend;
  }
@@ -693,7 +693,7 @@
   * @param currentBackend
   *          The current backend to set.
   */
  public void setCurrentBackend(Backend<?> currentBackend)
  public void setCurrentBackend(LocalBackend<?> currentBackend)
  {
    this.currentBackend = currentBackend;
  }
opendj-server-legacy/src/main/java/org/opends/server/tools/RestoreDB.java
@@ -36,8 +36,8 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.server.config.server.BackendCfg;
import org.forgerock.util.Utils;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.LockFileManager;
import org.opends.server.loggers.JDKLogging;
@@ -394,17 +394,17 @@
    // Get information about the backends defined in the server and determine
    // which to use for the restore.
    List<Backend<?>> backendList = new ArrayList<>();
    List<LocalBackend<?>> backendList = new ArrayList<>();
    List<BackendCfg> entryList = new ArrayList<>();
    List<List<DN>> dnList = new ArrayList<>();
    BackendToolUtils.getBackends(backendList, entryList, dnList);
    Backend<?> backend = null;
    LocalBackend<?> backend = null;
    int numBackends = backendList.size();
    for (int i=0; i < numBackends; i++)
    {
      Backend<?> b = backendList.get(i);
      LocalBackend<?> b = backendList.get(i);
      BackendCfg e = entryList.get(i);
      if (e.dn().equals(configEntryDN))
      {
opendj-server-legacy/src/main/java/org/opends/server/tools/VerifyIndex.java
@@ -31,8 +31,8 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.server.config.server.BackendCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.backends.VerifyConfig;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.DirectoryServer.DirectoryServerVersionHandler;
@@ -215,16 +215,16 @@
    // Get information about the backends defined in the server.  Iterate
    // through them, finding the one backend to be verified.
    List<Backend<?>> backendList = new ArrayList<>();
    List<LocalBackend<?>> backendList = new ArrayList<>();
    List<BackendCfg> entryList = new ArrayList<>();
    List<List<DN>> dnList = new ArrayList<>();
    BackendToolUtils.getBackends(backendList, entryList, dnList);
    Backend<?> backend = null;
    LocalBackend<?> backend = null;
    int numBackends = backendList.size();
    for (int i=0; i < numBackends; i++)
    {
      Backend<?> b = backendList.get(i);
      LocalBackend<?> b = backendList.get(i);
      List<DN>    baseDNs = dnList.get(i);
      if (baseDNs.contains(verifyBaseDN))
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendAddOperation.java
@@ -42,7 +42,7 @@
import org.forgerock.opendj.ldap.schema.Syntax;
import org.opends.server.api.AccessControlHandler;
import org.opends.server.api.AuthenticationPolicy;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.ClientConnection;
import org.opends.server.api.PasswordStorageScheme;
import org.opends.server.api.PasswordValidator;
@@ -87,7 +87,7 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The backend in which the entry is to be added. */
  private Backend<?> backend;
  private LocalBackend<?> backend;
  /** Indicates whether the request includes the LDAP no-op control. */
  private boolean noOp;
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendBindOperation.java
@@ -28,7 +28,7 @@
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.server.config.meta.PasswordPolicyCfgDefn;
import org.opends.server.api.AuthenticationPolicyState;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.ClientConnection;
import org.opends.server.api.SASLMechanismHandler;
import org.opends.server.controls.*;
@@ -57,7 +57,7 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The backend in which the bind operation should be processed. */
  private Backend<?> backend;
  private LocalBackend<?> backend;
  /**
   * Indicates whether the bind response should include the first warning
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendCompareOperation.java
@@ -33,7 +33,7 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.ResultCode;
import org.opends.server.api.AccessControlHandler;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.ClientConnection;
import org.opends.server.backends.ConfigurationBackend;
import org.opends.server.controls.LDAPAssertionRequestControl;
@@ -64,7 +64,7 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The backend in which the comparison is to be performed. */
  private Backend<?> backend;
  private LocalBackend<?> backend;
  /** The client connection for this operation. */
  private ClientConnection clientConnection;
  /** The DN of the entry to compare. */
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendDeleteOperation.java
@@ -22,7 +22,7 @@
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.forgerock.opendj.ldap.ResultCode;
import org.opends.server.api.AccessControlHandler;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.ClientConnection;
import org.opends.server.api.SynchronizationProvider;
import org.opends.server.controls.LDAPAssertionRequestControl;
@@ -65,7 +65,7 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The backend in which the operation is to be processed. */
  private Backend<?> backend;
  private LocalBackend<?> backend;
  /** Indicates whether the LDAP no-op control has been requested. */
  private boolean noOp;
@@ -273,7 +273,7 @@
      // the entry actually exists and does not have any children (or possibly
      // handling a subtree delete). But we will need to check if there are
      // any subordinate backends that should stop us from attempting the delete
      for (Backend<?> b : backend.getSubordinateBackends())
      for (LocalBackend<?> b : backend.getSubordinateBackends())
      {
        for (DN dn : b.getBaseDNs())
        {
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendModifyDNOperation.java
@@ -30,7 +30,7 @@
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.opends.server.api.AccessControlHandler;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.ClientConnection;
import org.opends.server.api.SynchronizationProvider;
import org.opends.server.controls.LDAPAssertionRequestControl;
@@ -78,7 +78,7 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The backend in which the operation is to be processed. */
  private Backend<?> backend;
  private LocalBackend<?> backend;
  /** Indicates whether the no-op control was included in the request. */
  private boolean noOp;
@@ -262,7 +262,7 @@
    // Get the backend for the current entry, and the backend for the new
    // entry. If either is null, or if they are different, then fail.
    Backend<?> currentBackend = backend;
    LocalBackend<?> currentBackend = backend;
    if (currentBackend == null)
    {
      setResultCode(ResultCode.NO_SUCH_OBJECT);
@@ -270,7 +270,7 @@
      return;
    }
    Backend<?> newBackend = DirectoryServer.getBackend(newDN);
    LocalBackend<?> newBackend = DirectoryServer.getBackend(newDN);
    if (newBackend == null)
    {
      setResultCode(ResultCode.NO_SUCH_OBJECT);
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
@@ -40,7 +40,7 @@
import org.forgerock.util.Utils;
import org.opends.server.api.AccessControlHandler;
import org.opends.server.api.AuthenticationPolicy;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.ClientConnection;
import org.opends.server.api.PasswordStorageScheme;
import org.opends.server.api.SynchronizationProvider;
@@ -98,7 +98,7 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The backend in which the target entry exists. */
  private Backend<?> backend;
  private LocalBackend<?> backend;
  /** The client connection associated with this operation. */
  private ClientConnection clientConnection;
  private boolean preOperationPluginsExecuted;
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendSearchOperation.java
@@ -22,7 +22,7 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.ResultCode;
import org.opends.server.api.AccessControlHandler;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.ClientConnection;
import org.opends.server.controls.*;
import org.opends.server.core.*;
@@ -50,7 +50,7 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The backend in which the search is to be performed. */
  private Backend<?> backend;
  private LocalBackend<?> backend;
  /** The client connection for the search operation. */
  private ClientConnection clientConnection;
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
@@ -30,7 +30,7 @@
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.SearchScope;
import org.opends.server.api.AccessControlHandler;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.backends.RootDSEBackend;
import org.opends.server.controls.LDAPPostReadRequestControl;
import org.opends.server.controls.LDAPPostReadResponseControl;
@@ -213,7 +213,7 @@
  private final DN baseDN;
  /** The backend associated with the local workflow element. */
  private final Backend<?> backend;
  private final LocalBackend<?> backend;
  /** The set of local backend workflow elements registered with the server. */
  private static TreeMap<DN, LocalBackendWorkflowElement> registeredLocalBackends = new TreeMap<>();
@@ -229,7 +229,7 @@
   * @param backend
   *          the backend associated to that workflow element
   */
  private LocalBackendWorkflowElement(DN baseDN, Backend<?> backend)
  private LocalBackendWorkflowElement(DN baseDN, LocalBackend<?> backend)
  {
    this.baseDN = baseDN;
    this.backend  = backend;
@@ -256,7 +256,7 @@
   * @return the existing local backend workflow element if it was already
   *         created or a newly created local backend workflow element.
   */
  public static LocalBackendWorkflowElement createAndRegister(DN baseDN, Backend<?> backend)
  public static LocalBackendWorkflowElement createAndRegister(DN baseDN, LocalBackend<?> backend)
  {
    LocalBackendWorkflowElement localBackend = registeredLocalBackends.get(baseDN);
    if (localBackend == null)
@@ -807,7 +807,7 @@
   * @return The backend associated with this local backend workflow
   *         element.
   */
  public Backend<?> getBackend()
  public LocalBackend<?> getBackend()
  {
    return backend;
  }
@@ -832,7 +832,7 @@
   * @throws DirectoryException
   *           If the update operation has been rejected.
   */
  static void checkIfBackendIsWritable(Backend<?> backend, Operation op,
  static void checkIfBackendIsWritable(LocalBackend<?> backend, Operation op,
      DN entryDN, LocalizableMessageDescriptor.Arg1<Object> serverMsg,
      LocalizableMessageDescriptor.Arg1<Object> backendMsg)
      throws DirectoryException
@@ -1133,10 +1133,10 @@
  private static Collection<LocalBackendWorkflowElement> getSubordinates(LocalBackendWorkflowElement workflow)
  {
    final DN baseDN = workflow.getBaseDN();
    final Backend<?> backend = workflow.getBackend();
    final LocalBackend<?> backend = workflow.getBackend();
    final ArrayList<LocalBackendWorkflowElement> results = new ArrayList<>();
    for (Backend<?> subordinate : backend.getSubordinateBackends())
    for (LocalBackend<?> subordinate : backend.getSubordinateBackends())
    {
      for (DN subordinateDN : subordinate.getBaseDNs())
      {
opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java
@@ -80,7 +80,7 @@
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.ResultCode;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.WorkQueue;
import org.opends.server.api.plugin.PluginType;
import org.opends.server.backends.MemoryBackend;
@@ -628,7 +628,7 @@
  private static void clearJEBackends() throws Exception
  {
    for (Backend<?> backend : DirectoryServer.getBackends())
    for (LocalBackend<?> backend : DirectoryServer.getBackends())
    {
      if (backend instanceof BackendImpl) {
        clearBackend(backend.getBackendID());
@@ -929,7 +929,7 @@
   */
  public static void clearBackend(String backendId, String baseDN) throws Exception
  {
    Backend<?> b = DirectoryServer.getBackend(backendId);
    LocalBackend<?> b = DirectoryServer.getBackend(backendId);
    if (clearBackend(b) && baseDN != null)
    {
      Entry e = createEntry(DN.valueOf(baseDN));
@@ -937,7 +937,7 @@
    }
  }
  private static boolean clearBackend(Backend<?> b)
  private static boolean clearBackend(LocalBackend<?> b)
  {
    if (b instanceof BackendImpl)
    {
opendj-server-legacy/src/test/java/org/opends/server/api/TestTaskListener.java
@@ -62,49 +62,49 @@
  }
  @Override
  public void processBackupBegin(Backend<?> backend, BackupConfig config)
  public void processBackupBegin(LocalBackend<?> backend, BackupConfig config)
  {
    backupBeginCount.incrementAndGet();
  }
  @Override
  public void processBackupEnd(Backend<?> backend, BackupConfig config, boolean successful)
  public void processBackupEnd(LocalBackend<?> backend, BackupConfig config, boolean successful)
  {
    backupEndCount.incrementAndGet();
  }
  @Override
  public void processRestoreBegin(Backend<?> backend, RestoreConfig config)
  public void processRestoreBegin(LocalBackend<?> backend, RestoreConfig config)
  {
    restoreBeginCount.incrementAndGet();
  }
  @Override
  public void processRestoreEnd(Backend<?> backend, RestoreConfig config, boolean successful)
  public void processRestoreEnd(LocalBackend<?> backend, RestoreConfig config, boolean successful)
  {
    restoreEndCount.incrementAndGet();
  }
  @Override
  public void processExportBegin(Backend<?> backend, LDIFExportConfig config)
  public void processExportBegin(LocalBackend<?> backend, LDIFExportConfig config)
  {
    exportBeginCount.incrementAndGet();
  }
  @Override
  public void processExportEnd(Backend<?> backend, LDIFExportConfig config, boolean successful)
  public void processExportEnd(LocalBackend<?> backend, LDIFExportConfig config, boolean successful)
  {
    exportEndCount.incrementAndGet();
  }
  @Override
  public void processImportBegin(Backend<?> backend, LDIFImportConfig config)
  public void processImportBegin(LocalBackend<?> backend, LDIFImportConfig config)
  {
    importBeginCount.incrementAndGet();
  }
  @Override
  public void processImportEnd(Backend<?> backend, LDIFImportConfig config, boolean successful)
  public void processImportEnd(LocalBackend<?> backend, LDIFImportConfig config, boolean successful)
  {
    importEndCount.incrementAndGet();
  }
opendj-server-legacy/src/test/java/org/opends/server/backends/ChangelogBackendTestCase.java
@@ -51,7 +51,7 @@
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.SearchScope;
import org.forgerock.opendj.server.config.server.ExternalChangelogDomainCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.backends.ChangelogBackend.ChangeNumberRange;
import org.opends.server.controls.EntryChangelogNotificationControl;
import org.opends.server.controls.ExternalChangelogRequestControl;
@@ -365,7 +365,7 @@
  {
    String test = "CookieTwoSuffixes";
    debugInfo(test, "Starting test\n\n");
    Backend<?> backendForSecondSuffix = null;
    LocalBackend<?> backendForSecondSuffix = null;
    try
    {
      backendForSecondSuffix = initializeMemoryBackend(true, TEST_BACKEND_ID2);
@@ -506,7 +506,7 @@
      debugInfo(test, "Starting test");
      // Use o=test3 to avoid collision with o=test2 already used by a previous test
      Backend<?> backend3 = null;
      LocalBackend<?> backend3 = null;
      LDAPReplicationDomain domain2 = null;
      try {
        ReplicationBroker broker = enableReplication(server1);
@@ -634,8 +634,8 @@
    final DN baseDN4 = DN.valueOf("o=" + backendId4);
    final String backendId5 = "test5";
    final DN baseDN5 = DN.valueOf("o=" + backendId5);
    Backend<?> backend4 = null;
    Backend<?> backend5 = null;
    LocalBackend<?> backend4 = null;
    LocalBackend<?> backend5 = null;
    LDAPReplicationDomain domain4 = null;
    LDAPReplicationDomain domain5 = null;
    LDAPReplicationDomain domain41 = null;
@@ -1517,7 +1517,7 @@
  }
  /** Creates a memory backend, to be used as additional backend in tests. */
  private static Backend<?> initializeMemoryBackend(boolean createBaseEntry, String backendId) throws Exception
  private static LocalBackend<?> initializeMemoryBackend(boolean createBaseEntry, String backendId) throws Exception
  {
    DN baseDN = DN.valueOf("o=" + backendId);
@@ -1547,9 +1547,9 @@
    return memoryBackend;
  }
  private static void removeBackend(Backend<?>... backends)
  private static void removeBackend(LocalBackend<?>... backends)
  {
    for (Backend<?> backend : backends)
    for (LocalBackend<?> backend : backends)
    {
      if (backend != null)
      {
opendj-server-legacy/src/test/java/org/opends/server/backends/GenericBackendTestCase.java
@@ -25,8 +25,8 @@
import org.forgerock.opendj.ldap.DN;
import org.opends.server.TestCaseUtils;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.core.DirectoryServer;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
@@ -52,7 +52,7 @@
  @DataProvider(name = "backends")
  public Object[][] getBackends()
  {
    List<Backend<?>> backendList = new ArrayList<>(DirectoryServer.getBackends());
    List<LocalBackend<?>> backendList = new ArrayList<>(DirectoryServer.getBackends());
    Object[][] objectArray = new Object[backendList.size()][1];
    for (int i=0; i < objectArray.length; i++)
    {
@@ -61,32 +61,32 @@
    return objectArray;
  }
  /** Tests the {@link Backend#getBaseDNs} method for the provided backend. */
  /** Tests the {@link LocalBackend#getBaseDNs} method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testGetBaseDNs(Backend<?> b)
  public void testGetBaseDNs(LocalBackend<?> b)
  {
    Set<DN> baseDNs = b.getBaseDNs();
    assertNotNull(baseDNs);
    assertNotEquals(baseDNs.size(), 0);
  }
  /** Tests the {@link Backend#getSupportedControls} method for the provided backend. */
  /** Tests the {@link LocalBackend#getSupportedControls} method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testGetSupportedControls(Backend<?> b)
  public void testGetSupportedControls(LocalBackend<?> b)
  {
    assertNotNull(b.getSupportedControls());
  }
  /** Tests the supports control method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testSupportsControl(Backend<?> b)
  public void testSupportsControl(LocalBackend<?> b)
  {
    assertFalse(b.supportsControl("1.2.3.4"));
  }
  /** Tests the {@link Backend#getSupportedFeatures} method for the provided backend. */
  /** Tests the {@link LocalBackend#getSupportedFeatures} method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testGetSupportedFeatures(Backend<?> b)
  public void testGetSupportedFeatures(LocalBackend<?> b)
  {
    assertNotNull(b.getSupportedFeatures());
    b.getSupportedFeatures();
@@ -94,88 +94,88 @@
  /** Tests the supports LDIF export method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testSupportsLDIFExport(Backend<?> b)
  public void testSupportsLDIFExport(LocalBackend<?> b)
  {
    b.supports(BackendOperation.LDIF_EXPORT);
  }
  /** Tests the supports LDIF import method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testSupportsLDIFImport(Backend<?> b)
  public void testSupportsLDIFImport(LocalBackend<?> b)
  {
    b.supports(BackendOperation.LDIF_IMPORT);
  }
  /** Tests the supports Backup method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testSupportsBackup(Backend<?> b)
  public void testSupportsBackup(LocalBackend<?> b)
  {
    b.supports(BackendOperation.BACKUP);
  }
  /** Tests the supports restore method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testSupportsRestore(Backend<?> b)
  public void testSupportsRestore(LocalBackend<?> b)
  {
    b.supports(BackendOperation.RESTORE);
  }
  /** Tests the {@link Backend#getBackendID} method for the provided backend. */
  /** Tests the {@link LocalBackend#getBackendID} method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testGetBackendID(Backend<?> b)
  public void testGetBackendID(LocalBackend<?> b)
  {
    assertNotNull(b.getBackendID());
    assertTrue(b.getBackendID().length() > 0);
  }
  /** Tests the {@link Backend#isPrivateBackend} method for the provided backend. */
  /** Tests the {@link LocalBackend#isPrivateBackend} method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testIsPrivateBackend(Backend<?> b)
  public void testIsPrivateBackend(LocalBackend<?> b)
  {
    b.isPrivateBackend();
  }
  /** Tests the {@link Backend#getWritabilityMode} method for the provided backend. */
  /** Tests the {@link LocalBackend#getWritabilityMode} method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testGetWritabilityMode(Backend<?> b)
  public void testGetWritabilityMode(LocalBackend<?> b)
  {
    assertNotNull(b.getWritabilityMode());
  }
  /** Tests the {@link Backend#getBackendMonitor} method for the provided backend. */
  /** Tests the {@link LocalBackend#getBackendMonitor} method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testGetBackendMonitor(Backend<?> b)
  public void testGetBackendMonitor(LocalBackend<?> b)
  {
    assertNotNull(b.getBackendMonitor());
  }
  /** Tests the {@link Backend#getEntryCount} method for the provided backend. */
  /** Tests the {@link LocalBackend#getEntryCount} method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testGetEntryCount(Backend<?> b)
  public void testGetEntryCount(LocalBackend<?> b)
  {
    b.getEntryCount();
  }
  /** Tests the {@link Backend#getParentBackend} method for the provided backend. */
  /** Tests the {@link LocalBackend#getParentBackend} method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testGetParentBackend(Backend<?> b)
  public void testGetParentBackend(LocalBackend<?> b)
  {
    b.getParentBackend();
  }
  /** Tests the {@link Backend#getSubordinateBackends} method for the provided backend. */
  /** Tests the {@link LocalBackend#getSubordinateBackends} method for the provided backend. */
  @Test(dataProvider = "backends")
  public void testGetSubordinateBackends(Backend<?> b)
  public void testGetSubordinateBackends(LocalBackend<?> b)
  {
    assertNotNull(b.getSubordinateBackends());
  }
  /**
   * Tests the {@link Backend#handlesEntry} method for the provided backend for each of the declared
   * Tests the {@link LocalBackend#handlesEntry} method for the provided backend for each of the declared
   * base DNs.
   */
  @Test(dataProvider = "backends")
  public void testHandlesEntry(Backend<?> b) throws Exception
  public void testHandlesEntry(LocalBackend<?> b) throws Exception
  {
    for (DN baseDN : b.getBaseDNs())
    {
opendj-server-legacy/src/test/java/org/opends/server/backends/LDIFBackendTestCase.java
@@ -28,8 +28,8 @@
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.SearchScope;
import org.opends.server.TestCaseUtils;
import org.opends.server.api.Backend;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.core.AddOperation;
import org.opends.server.core.CompareOperation;
import org.opends.server.core.DeleteOperation;
@@ -610,7 +610,7 @@
  @Test
  public void testHasSubordinates() throws Exception
  {
    Backend<?> b = getLDIFBackend();
    LocalBackend<?> b = getLDIFBackend();
    assertEquals(b.hasSubordinates(DN.valueOf("o=ldif")), ConditionResult.TRUE);
    assertEquals(b.hasSubordinates(DN.valueOf("uid=user.1,ou=People,o=ldif")),
@@ -636,7 +636,7 @@
  @Test
  public void testNumSubordinates() throws Exception
  {
    Backend<?> b = getLDIFBackend();
    LocalBackend<?> b = getLDIFBackend();
    assertEquals(b.getNumberOfChildren(DN.valueOf("o=ldif")), 1);
    assertEquals(b.getNumberOfEntriesInBaseDN(DN.valueOf("o=ldif")), 27);
@@ -665,7 +665,7 @@
  @Test
  public void testLDIFExport() throws Exception
  {
    Backend<?> b = getLDIFBackend();
    LocalBackend<?> b = getLDIFBackend();
    assertTrue(b.supports(BackendOperation.LDIF_EXPORT));
    String tempFilePath = TestCaseUtils.createTempFile();
@@ -726,7 +726,7 @@
  private LDIFBackend getLDIFBackend()
  {
    Backend<?> b = DirectoryServer.getBackend("ldifRoot");
    LocalBackend<?> b = DirectoryServer.getBackend("ldifRoot");
    assertNotNull(b);
    assertTrue(b instanceof LDIFBackend);
    return (LDIFBackend) b;
opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/PluggableBackendImplTestCase.java
@@ -52,7 +52,7 @@
import org.forgerock.opendj.server.config.server.BackendIndexCfg;
import org.forgerock.opendj.server.config.server.BackendVLVIndexCfg;
import org.forgerock.opendj.server.config.server.PluggableBackendCfg;
import org.opends.server.api.Backend.BackendOperation;
import org.opends.server.api.LocalBackend.BackendOperation;
import org.opends.server.api.ClientConnection;
import org.opends.server.backends.RebuildConfig;
import org.opends.server.backends.RebuildConfig.RebuildMode;
opendj-server-legacy/src/test/java/org/opends/server/core/AddOperationTestCase.java
@@ -39,7 +39,7 @@
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.ldap.schema.ObjectClass;
import org.opends.server.TestCaseUtils;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.plugins.DisconnectClientPlugin;
import org.opends.server.plugins.ShortCircuitPlugin;
import org.opends.server.plugins.UpdatePreOpPlugin;
@@ -72,7 +72,7 @@
  /** Some of the tests disable the backends, so we reenable them here. */
  @AfterMethod(alwaysRun=true)
  public void reenableBackend() throws DirectoryException {
    Backend<?> b = DirectoryServer.getBackend(DN.valueOf("o=test"));
    LocalBackend<?> b = DirectoryServer.getBackend(DN.valueOf("o=test"));
    b.setWritabilityMode(WritabilityMode.ENABLED);
  }
@@ -1209,7 +1209,7 @@
         "cn: Test User",
         "userPassword: password");
    Backend<?> b = DirectoryServer.getBackend(DN.valueOf("o=test"));
    LocalBackend<?> b = DirectoryServer.getBackend(DN.valueOf("o=test"));
    b.setWritabilityMode(WritabilityMode.DISABLED);
    AddOperation addOperation = getRootConnection().processAdd(entry);
@@ -1241,7 +1241,7 @@
         "cn: Test User",
         "userPassword: password");
    Backend<?> b = DirectoryServer.getBackend(DN.valueOf("o=test"));
    LocalBackend<?> b = DirectoryServer.getBackend(DN.valueOf("o=test"));
    b.setWritabilityMode(WritabilityMode.INTERNAL_ONLY);
    AddOperation addOperation = getRootConnection().processAdd(entry);
@@ -1266,7 +1266,7 @@
    {
      conn.bind("cn=Directory Manager", "password");
      Backend<?> b = DirectoryServer.getBackend(DN.valueOf("o=test"));
      LocalBackend<?> b = DirectoryServer.getBackend(DN.valueOf("o=test"));
      b.setWritabilityMode(WritabilityMode.INTERNAL_ONLY);
      long addRequests  = ldapStatistics.getAddRequests();
opendj-server-legacy/src/test/java/org/opends/server/core/BackendConfigManagerTestCase.java
@@ -23,7 +23,7 @@
import org.forgerock.opendj.ldap.SearchScope;
import org.forgerock.opendj.ldap.requests.ModifyRequest;
import org.opends.server.TestCaseUtils;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.protocols.internal.InternalClientConnection;
import org.opends.server.protocols.internal.InternalSearchOperation;
import org.opends.server.protocols.internal.SearchRequest;
@@ -152,7 +152,7 @@
    processAdd(backendEntry);
    Backend<?> backend = DirectoryServer.getBackend(backendID);
    LocalBackend<?> backend = DirectoryServer.getBackend(backendID);
    assertBackend(baseDN, backend);
    createEntry(baseDN, backend);
@@ -185,7 +185,7 @@
    // Modify the backend to enable it.
    enableBackend(backendEntry, true);
    Backend<?> backend = DirectoryServer.getBackend(backendID);
    LocalBackend<?> backend = DirectoryServer.getBackend(backendID);
    assertBackend(baseDN, backend);
    createEntry(baseDN, backend);
@@ -219,7 +219,7 @@
                                                  parentBaseDN);
    processAdd(parentBackendEntry);
    Backend<?> parentBackend = DirectoryServer.getBackend(parentBackendID);
    LocalBackend<?> parentBackend = DirectoryServer.getBackend(parentBackendID);
    assertBackend(parentBaseDN, parentBackend);
    createEntry(parentBaseDN, parentBackend);
@@ -231,7 +231,7 @@
                                                 childBaseDN);
    processAdd(childBackendEntry);
    Backend<?> childBackend = DirectoryServer.getBackend(childBackendID);
    LocalBackend<?> childBackend = DirectoryServer.getBackend(childBackendID);
    assertNotNull(childBackend);
    assertEquals(childBackend,
                 DirectoryServer.getBackendWithBaseDN(childBaseDN));
@@ -288,7 +288,7 @@
                                                 childBaseDN);
    processAdd(childBackendEntry);
    Backend<?> childBackend = DirectoryServer.getBackend(childBackendID);
    LocalBackend<?> childBackend = DirectoryServer.getBackend(childBackendID);
    assertBackend(childBaseDN, childBackend);
    createEntry(childBaseDN, childBackend);
    assertTrue(DirectoryServer.isNamingContext(childBaseDN));
@@ -302,7 +302,7 @@
                                                  parentBaseDN);
    processAdd(parentBackendEntry);
    Backend<?> parentBackend = DirectoryServer.getBackend(parentBackendID);
    LocalBackend<?> parentBackend = DirectoryServer.getBackend(parentBackendID);
    assertNotNull(parentBackend);
    assertEquals(parentBackend,
                 DirectoryServer.getBackendWithBaseDN(parentBaseDN));
@@ -333,7 +333,7 @@
    assertNull(DirectoryServer.getBackend(parentBackendID));
  }
  private void assertBackend(DN baseDN, Backend<?> backend) throws DirectoryException
  private void assertBackend(DN baseDN, LocalBackend<?> backend) throws DirectoryException
  {
    assertNotNull(backend);
    assertEquals(backend, DirectoryServer.getBackendWithBaseDN(baseDN));
@@ -361,7 +361,7 @@
                                                  parentBaseDN);
    processAdd(parentBackendEntry);
    Backend<?> parentBackend = DirectoryServer.getBackend(parentBackendID);
    LocalBackend<?> parentBackend = DirectoryServer.getBackend(parentBackendID);
    assertBackend(parentBaseDN, parentBackend);
    createEntry(parentBaseDN, parentBackend);
    assertTrue(DirectoryServer.isNamingContext(parentBaseDN));
@@ -374,7 +374,7 @@
                                                      grandchildBaseDN);
    processAdd(grandchildBackendEntry);
    Backend<?> grandchildBackend = DirectoryServer.getBackend(grandchildBackendID);
    LocalBackend<?> grandchildBackend = DirectoryServer.getBackend(grandchildBackendID);
    assertNotNull(grandchildBackend);
    assertEquals(grandchildBackend,
                 DirectoryServer.getBackendWithBaseDN(grandchildBaseDN));
@@ -398,7 +398,7 @@
                                                 childBaseDN);
    processAdd(childBackendEntry);
    Backend<?> childBackend = DirectoryServer.getBackend(childBackendID);
    LocalBackend<?> childBackend = DirectoryServer.getBackend(childBackendID);
    createBackend(childBaseDN, childBackend, parentBackend, grandchildBackend);
    createEntry(childBaseDN, childBackend);
@@ -476,8 +476,8 @@
    assertEquals(internalSearch.getSearchEntries().size(), expected);
  }
  private void createBackend(DN childBaseDN, Backend<?> childBackend, Backend<?> parentBackend,
      Backend<?> grandchildBackend) throws DirectoryException
  private void createBackend(DN childBaseDN, LocalBackend<?> childBackend, LocalBackend<?> parentBackend,
      LocalBackend<?> grandchildBackend) throws DirectoryException
  {
    assertNotNull(childBackend);
    assertEquals(childBackend, DirectoryServer.getBackendWithBaseDN(childBaseDN));
@@ -490,7 +490,7 @@
    assertEquals(grandchildBackend.getParentBackend(), childBackend);
  }
  private void createEntry(DN baseDN, Backend<?> backend) throws DirectoryException
  private void createEntry(DN baseDN, LocalBackend<?> backend) throws DirectoryException
  {
    Entry e = StaticUtils.createEntry(baseDN);
    processAdd(e);
opendj-server-legacy/src/test/java/org/opends/server/core/DeleteOperationTestCase.java
@@ -25,7 +25,7 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.ResultCode;
import org.opends.server.TestCaseUtils;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.plugins.DisconnectClientPlugin;
import org.opends.server.plugins.ShortCircuitPlugin;
import org.opends.server.protocols.ldap.DeleteRequestProtocolOp;
@@ -58,7 +58,7 @@
  /** Some of the tests disable the backends, so we reenable them here. */
  @AfterMethod(alwaysRun=true)
  public void reenableBackend() throws DirectoryException {
    Backend<?> b = DirectoryServer.getBackend(DN.valueOf("o=test"));
    LocalBackend<?> b = DirectoryServer.getBackend(DN.valueOf("o=test"));
    b.setWritabilityMode(WritabilityMode.ENABLED);
  }
@@ -569,7 +569,7 @@
  {
    TestCaseUtils.initializeTestBackend(true);
    Backend<?> backend = DirectoryServer.getBackend(DN.valueOf("o=test"));
    LocalBackend<?> backend = DirectoryServer.getBackend(DN.valueOf("o=test"));
    backend.setWritabilityMode(WritabilityMode.DISABLED);
    DeleteOperation deleteOperation = processDeleteRaw("o=test");
@@ -591,7 +591,7 @@
  {
    TestCaseUtils.initializeTestBackend(true);
    Backend<?> backend = DirectoryServer.getBackend(DN.valueOf("o=test"));
    LocalBackend<?> backend = DirectoryServer.getBackend(DN.valueOf("o=test"));
    backend.setWritabilityMode(WritabilityMode.INTERNAL_ONLY);
    DeleteOperation deleteOperation = processDeleteRaw("o=test");
@@ -613,7 +613,7 @@
  {
    TestCaseUtils.initializeTestBackend(true);
    Backend<?> backend = DirectoryServer.getBackend(DN.valueOf("o=test"));
    LocalBackend<?> backend = DirectoryServer.getBackend(DN.valueOf("o=test"));
    backend.setWritabilityMode(WritabilityMode.INTERNAL_ONLY);
    String[] args = getArgs("o=test");
opendj-server-legacy/src/test/java/org/opends/server/core/ModifyOperationTestCase.java
@@ -45,7 +45,7 @@
import org.forgerock.opendj.ldap.requests.Requests;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.opends.server.TestCaseUtils;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.plugins.DisconnectClientPlugin;
import org.opends.server.plugins.ShortCircuitPlugin;
import org.opends.server.plugins.UpdatePreOpPlugin;
@@ -96,7 +96,7 @@
    for (Object[] backendBaseDN2 : getBaseDNs())
    {
      final DN baseDN = DN.valueOf(backendBaseDN2[0].toString());
      Backend<?> b = DirectoryServer.getBackend(baseDN);
      LocalBackend<?> b = DirectoryServer.getBackend(baseDN);
      b.setWritabilityMode(WritabilityMode.ENABLED);
    }
  }
@@ -2429,7 +2429,7 @@
         "mail: foo",
         "employeeNumber: 1");
    Backend<?> b = DirectoryServer.getBackend(DN.valueOf(baseDN));
    LocalBackend<?> b = DirectoryServer.getBackend(DN.valueOf(baseDN));
    b.setWritabilityMode(WritabilityMode.DISABLED);
    RawModification mod = newRawModification(ADD, "objectClass", "extensibleObject");
@@ -2467,7 +2467,7 @@
         "mail: foo",
         "employeeNumber: 1");
    Backend<?> b = DirectoryServer.getBackend(DN.valueOf(baseDN));
    LocalBackend<?> b = DirectoryServer.getBackend(DN.valueOf(baseDN));
    b.setWritabilityMode(WritabilityMode.INTERNAL_ONLY);
    RawModification mod = newRawModification(ADD, "objectClass", "extensibleObject");
@@ -2505,7 +2505,7 @@
         "mail: foo",
         "employeeNumber: 1");
    Backend<?> b = DirectoryServer.getBackend(DN.valueOf(baseDN));
    LocalBackend<?> b = DirectoryServer.getBackend(DN.valueOf(baseDN));
    b.setWritabilityMode(WritabilityMode.INTERNAL_ONLY);
    try (RemoteConnection conn = new RemoteConnection("localhost", TestCaseUtils.getServerLdapPort()))
@@ -3230,7 +3230,7 @@
        "cn: Test User",
        "userPassword: password",
        "userPassword;deleted: oldpassword");
    Backend<?> backend = DirectoryServer.getBackend(TEST_BACKEND_ID);
    LocalBackend<?> backend = DirectoryServer.getBackend(TEST_BACKEND_ID);
    backend.addEntry(e, null); // Don't use add operation.
    // Constraint violation.
@@ -3271,7 +3271,7 @@
        "cn: Test User",
        "userPassword: password",
        "userPassword;deleted: oldpassword");
    Backend<?> backend = DirectoryServer.getBackend(TEST_BACKEND_ID);
    LocalBackend<?> backend = DirectoryServer.getBackend(TEST_BACKEND_ID);
    backend.addEntry(e, null); // Don't use add operation.
    // Constraint violation.
opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/LDAPBinaryOptionTestCase.java
@@ -36,7 +36,7 @@
import org.forgerock.opendj.ldap.requests.AddRequest;
import org.forgerock.opendj.ldap.requests.Requests;
import org.opends.server.TestCaseUtils;
import org.opends.server.api.Backend;
import org.opends.server.api.LocalBackend;
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.internal.InternalSearchOperation;
import org.opends.server.protocols.internal.SearchRequest;
@@ -64,7 +64,7 @@
  /** LDIFImportConfig used for importing entries. */
  private LDIFImportConfig importConfig;
  /** Test Backend. */
  private Backend<?> backend;
  private LocalBackend<?> backend;
  /** Constant value of userCertificate attribute. */
  private static final String CERT=