From 7eda83737e5c2a09bef758ac2bcd3b7ea8b32ce3 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Wed, 20 Jun 2007 18:27:41 +0000
Subject: [PATCH] This refactoring includes the following changes to the JE backend: - Extracted common interface DatabaseContainer from DN2ID, ID2Entry, etc... classes. - Moved database read and write methods from EntryContainer to DatabaseContainer. - Added index configuration to the XML based admin framework. - Removed redundant configuration objects (Config, IndexConfig). - Added exclusive/shared lock to EntryContainer. All access to an EntryContainer must acquire a lock before using the internal  DatabaseContainers or making configuration changes. - Added the ability to add/remove/modify indexes with the backend online. Server will issue rebuild required warning when adding new indexes  or sub-indexes (equality, substring, presence...). - Added the ability to change the index entry limit for both the backend and each index with the backend online. Server will issue rebuild  required warning if the previous limit has been exceeded. - Added the ability to change entry compression and index substring length setting while the backend is online. - Added a persistent state database to each EntryContainer to persist backend configuration between server restarts. Server will issue  rebuild required warning if a new index is added when the backend is offline. - Added a trusted flag to indexes so that non existent keys will not be interpreted as an empty entry ID set when an index is untrusted. An  index is untrusted when it is added to an non-empty EntryContainer or an inconsistency is detected. Server will issue warning on startup to  rebuild the index.  - Fixed a issue where the LDIF import process stops responding if the temporary import dir is full or unwritable. 

---
 opends/src/server/org/opends/server/monitors/DatabaseEnvironmentMonitor.java |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/opends/src/server/org/opends/server/monitors/DatabaseEnvironmentMonitor.java b/opends/src/server/org/opends/server/monitors/DatabaseEnvironmentMonitor.java
index 8f2aad5..07c8312 100644
--- a/opends/src/server/org/opends/server/monitors/DatabaseEnvironmentMonitor.java
+++ b/opends/src/server/org/opends/server/monitors/DatabaseEnvironmentMonitor.java
@@ -40,9 +40,9 @@
 import org.opends.server.types.AttributeType;
 import org.opends.server.types.AttributeValue;
 import org.opends.server.types.InitializationException;
+import org.opends.server.backends.jeb.RootContainer;
 
 import com.sleepycat.je.DatabaseException;
-import com.sleepycat.je.Environment;
 import com.sleepycat.je.EnvironmentStats;
 import com.sleepycat.je.JEVersion;
 import com.sleepycat.je.LockStats;
@@ -73,23 +73,23 @@
   private String name;
 
   /**
-   * The JE environment handle to be monitored.
+   * The root container to be monitored.
    */
-  private Environment environment;
+  private RootContainer rootContainer;
 
   /**
    * Creates a new database environment monitor.
    * @param name The monitor instance name.
-   * @param environment A JE environment handle for the database to be
+   * @param rootContainer A root container handle for the database to be
    * monitored.
    */
-  public DatabaseEnvironmentMonitor(String name, Environment environment)
+  public DatabaseEnvironmentMonitor(String name, RootContainer rootContainer)
   {
     super(name + " Monitor Provider");
 
 
     this.name = name;
-    this.environment = environment;
+    this.rootContainer = rootContainer;
   }
 
 
@@ -228,9 +228,10 @@
 
     try
     {
-      environmentStats = environment.getStats(statsConfig);
-      lockStats = environment.getLockStats(statsConfig);
-      transactionStats = environment.getTransactionStats(statsConfig);
+      environmentStats = rootContainer.getEnvironmentStats(statsConfig);
+      lockStats = rootContainer.getEnvironmentLockStats(statsConfig);
+      transactionStats =
+          rootContainer.getEnvironmentTransactionStats(statsConfig);
     } catch (DatabaseException e)
     {
       if (debugEnabled())

--
Gitblit v1.10.0