From eaa95348ed85ad3d9909e8e703bdeae31a48e0ab Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 17 Dec 2014 15:47:14 +0000
Subject: [PATCH] OPENDJ-1602 (CR-5566) New pluggable storage based backend

---
 opendj3-server-dev/src/server/org/opends/server/backends/pluggable/RootContainer.java |   77 ++------------------------------------
 1 files changed, 4 insertions(+), 73 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/RootContainer.java b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/RootContainer.java
index a314d48..8fecbcf 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/RootContainer.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/RootContainer.java
@@ -383,61 +383,7 @@
       // is filled.
       try
       {
-        // Configure preload of Leaf Nodes (LNs) containing the data values.
-        PreloadConfig preloadConfig = new PreloadConfig();
-        preloadConfig.setLoadLNs(true);
-
-        logger.info(NOTE_JEB_CACHE_PRELOAD_STARTED, backend.getBackendID());
-
-        boolean isInterrupted = false;
-
-        long timeEnd = System.currentTimeMillis() + timeLimit;
-
-        for (DatabaseContainer db : dbList)
-        {
-          // Calculate the remaining time.
-          long timeRemaining = timeEnd - System.currentTimeMillis();
-          if (timeRemaining <= 0)
-          {
-            break;
-          }
-
-          preloadConfig.setMaxMillisecs(timeRemaining);
-          PreloadStats preloadStats = db.preload(preloadConfig);
-
-          if(logger.isTraceEnabled())
-          {
-            logger.trace("file=" + db.getName() + " LNs=" + preloadStats.getNLNsLoaded());
-          }
-
-          // Stop if the cache is full or the time limit has been exceeded.
-          PreloadStatus preloadStatus = preloadStats.getStatus();
-          if (preloadStatus != PreloadStatus.SUCCESS)
-          {
-            if (preloadStatus == PreloadStatus.EXCEEDED_TIME) {
-              logger.info(NOTE_JEB_CACHE_PRELOAD_INTERRUPTED_BY_TIME, backend.getBackendID(), db.getName());
-            } else if (preloadStatus == PreloadStatus.FILLED_CACHE) {
-              logger.info(NOTE_JEB_CACHE_PRELOAD_INTERRUPTED_BY_SIZE, backend.getBackendID(), db.getName());
-            } else {
-              logger.info(NOTE_JEB_CACHE_PRELOAD_INTERRUPTED_UNKNOWN, backend.getBackendID(), db.getName());
-            }
-
-            isInterrupted = true;
-            break;
-          }
-
-          logger.info(NOTE_JEB_CACHE_DB_PRELOADED, db.getName());
-        }
-
-        if (!isInterrupted) {
-          logger.info(NOTE_JEB_CACHE_PRELOAD_DONE, backend.getBackendID());
-        }
-
-        // Log an informational message about the size of the cache.
-        EnvironmentStats stats = storage.getStats(new StatsConfig());
-        long total = stats.getCacheTotalBytes();
-
-        logger.info(NOTE_JEB_CACHE_SIZE_AFTER_PRELOAD, total / (1024 * 1024));
+        throw new NotImplementedException();
       }
       catch (StorageRuntimeException e)
       {
@@ -471,7 +417,8 @@
       }
     }
 
-    compressedSchema.close();
+    // FIXME JNR call close() for a DB stored compressed schema
+    // compressedSchema.close();
     config.removeLocalDBChangeListener(this);
 
     if (storage != null)
@@ -525,22 +472,6 @@
   }
 
   /**
-   * Get the environment stats of the JE environment used in this root
-   * container.
-   *
-   * @param statsConfig The configuration to use for the EnvironmentStats
-   *                    object.
-   * @return The environment status of the JE environment.
-   * @throws StorageRuntimeException If an error occurs while retrieving the stats
-   *                           object.
-   */
-  public EnvironmentStats getEnvironmentStats(StatsConfig statsConfig)
-      throws StorageRuntimeException
-  {
-    return storage.getStats(statsConfig);
-  }
-
-  /**
    * Get the backend configuration used by this root container.
    *
    * @return The JE backend configuration used by this root container.
@@ -676,7 +607,7 @@
 
     try
     {
-      ConfigurableEnvironment.parseConfigEntry(cfg);
+      // FIXME JNR validate database specific configuration
     }
     catch (Exception e)
     {

--
Gitblit v1.10.0