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

Yannick Lecaillez
21.34.2015 ac27a41b85595ecd2444a64d822ab37aa8722fed
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/RootContainer.java
@@ -70,10 +70,10 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The tree storage. */
  private Storage storage;
  private final Storage storage;
  /** The backend to which this entry root container belongs. */
  private final BackendImpl<?> backend;
  /** The ID of the backend to which this entry root container belongs. */
  private final String backendId;
  /** The backend configuration. */
  private final PluggableBackendCfg config;
  /** The monitor for this backend. */
@@ -93,13 +93,14 @@
   *
   * @param config
   *          The configuration of the backend.
   * @param backend
   * @param backendID
   *          A reference to the backend that is creating this root
   *          container.
   */
  RootContainer(BackendImpl<?> backend, PluggableBackendCfg config)
  RootContainer(String backendID, Storage storage, PluggableBackendCfg config)
  {
    this.backend = backend;
    this.backendId = backendID;
    this.storage = storage;
    this.config = config;
    getMonitorProvider().enableFilterUseStats(config.isIndexFilterAnalyzerEnabled());
@@ -130,7 +131,6 @@
  {
    try
    {
      storage = backend.getStorage();
      storage.open();
      storage.write(new WriteOperation()
      {
@@ -169,7 +169,7 @@
  EntryContainer openEntryContainer(DN baseDN, WriteableTransaction txn)
      throws StorageRuntimeException, ConfigException
  {
    EntryContainer ec = new EntryContainer(baseDN, backend, config, storage, this);
    EntryContainer ec = new EntryContainer(baseDN, backendId, config, storage, this);
    ec.open(txn);
    return ec;
  }
@@ -258,8 +258,7 @@
  {
    if (monitor == null)
    {
      String monitorName = backend.getBackendID() + " Storage";
      monitor = new BackendMonitor(monitorName, this);
      monitor = new BackendMonitor(backendId + " Storage", this);
    }
    return monitor;
  }
@@ -300,9 +299,7 @@
      }
      catch (StorageRuntimeException e)
      {
        logger.traceException(e);
        logger.error(ERR_CACHE_PRELOAD, backend.getBackendID(),
        logger.error(ERR_CACHE_PRELOAD, backendId,
            stackTraceToSingleLineString(e.getCause() != null ? e.getCause() : e));
      }
    }
@@ -333,7 +330,6 @@
    if (storage != null)
    {
      storage.close();
      storage = null;
    }
  }