From 6669e6d8a40905f214d83c36ffade6811b41844b Mon Sep 17 00:00:00 2001
From: Fabio Pistolesi <fabio.pistolesi@forgerock.com>
Date: Mon, 23 Mar 2015 13:55:15 +0000
Subject: [PATCH] OPENDJ-1727 CR-6350 db-cache-percent default values in persistit backend probably too aggressive

---
 opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java |   20 ++++++--------------
 1 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java
index 40de1cc..be79802 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java
@@ -95,9 +95,6 @@
       OID_SERVER_SIDE_SORT_REQUEST_CONTROL,
       OID_VLV_REQUEST_CONTROL));
 
-  /** The server context for this directory server. */
-  protected ServerContext serverContext;
-
   /**
    * Begin a Backend API method that accesses the database and returns the <code>EntryContainer</code> for
    * <code>entryDN</code>.
@@ -152,9 +149,8 @@
     Reject.ifNull(cfg);
 
     this.cfg = cfg;
-    this.serverContext = serverContext;
     baseDNs = this.cfg.getBaseDN().toArray(new DN[0]);
-    storage = new TracedStorage(configureStorage(cfg), cfg.getBackendId());
+    storage = new TracedStorage(configureStorage(cfg, serverContext), cfg.getBackendId());
   }
 
   /** {@inheritDoc} */
@@ -796,22 +792,18 @@
    *
    * @param cfg
    *          the configuration object
+   * @param serverContext
+   *          this Directory Server intsance's server context
    * @return The storage engine to be used by this pluggable backend.
    * @throws ConfigException
    *           If there is an error in the configuration.
    */
-  protected abstract Storage configureStorage(C cfg) throws ConfigException;
+  protected abstract Storage configureStorage(C cfg, ServerContext serverContext) throws ConfigException;
 
   /** {@inheritDoc} */
   @Override
-  public void setServerContext(ServerContext context)
-  {
-    this.serverContext = context;
-  }
-
-  /** {@inheritDoc} */
-  @Override
-  public boolean isConfigurationAcceptable(C config, List<LocalizableMessage> unacceptableReasons)
+  public boolean isConfigurationAcceptable(C config, List<LocalizableMessage> unacceptableReasons,
+      ServerContext serverContext)
   {
     return isConfigurationChangeAcceptable(config, unacceptableReasons);
   }

--
Gitblit v1.10.0