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/backends/jeb/OrderingIndexer.java |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/jeb/OrderingIndexer.java b/opends/src/server/org/opends/server/backends/jeb/OrderingIndexer.java
index a6b38e3..70d9b15 100644
--- a/opends/src/server/org/opends/server/backends/jeb/OrderingIndexer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/OrderingIndexer.java
@@ -57,10 +57,10 @@
 
 
   /**
-   * The attribute index configuration for which this instance will
+   * The attribute type for which this instance will
    * generate index keys.
    */
-  private IndexConfig indexConfig;
+  private AttributeType attributeType;
 
   /**
    * The attribute type ordering matching rule which is also the
@@ -71,13 +71,13 @@
 
   /**
    * Create a new attribute ordering indexer for the given index configuration.
-   * @param indexConfig The index configuration for which an indexer is
+   * @param attributeType The attribute type for which an indexer is
    * required.
    */
-  public OrderingIndexer(IndexConfig indexConfig)
+  public OrderingIndexer(AttributeType attributeType)
   {
-    this.indexConfig = indexConfig;
-    orderingRule = indexConfig.getAttributeType().getOrderingMatchingRule();
+    this.attributeType = attributeType;
+    this.orderingRule = attributeType.getOrderingMatchingRule();
   }
 
   /**
@@ -87,7 +87,7 @@
    */
   public String toString()
   {
-    return indexConfig.getAttributeType().getNameOrOID() + ".ordering";
+    return attributeType.getNameOrOID() + ".ordering";
   }
 
   /**
@@ -113,7 +113,7 @@
                        Set<ASN1OctetString> keys)
   {
     List<Attribute> attrList =
-         entry.getAttribute(indexConfig.getAttributeType());
+         entry.getAttribute(attributeType);
     if (attrList != null)
     {
       indexAttribute(attrList, keys);
@@ -138,11 +138,11 @@
   {
     List<Attribute> attrList;
 
-    attrList = oldEntry.getAttribute(indexConfig.getAttributeType());
+    attrList = oldEntry.getAttribute(attributeType);
     Set<ASN1OctetString> oldSet = new HashSet<ASN1OctetString>();
     indexAttribute(attrList, oldSet);
 
-    attrList = newEntry.getAttribute(indexConfig.getAttributeType());
+    attrList = newEntry.getAttribute(attributeType);
     Set<ASN1OctetString> newSet = new HashSet<ASN1OctetString>();
     indexAttribute(attrList, newSet);
 
@@ -181,7 +181,7 @@
        throws DatabaseException
   {
     List<Attribute> beforeList;
-    beforeList = oldEntry.getAttribute(indexConfig.getAttributeType());
+    beforeList = oldEntry.getAttribute(attributeType);
 
     // Pick out the modifications that apply to this indexed attribute
 
@@ -203,7 +203,7 @@
     {
       Attribute modAttr = mod.getAttribute();
       AttributeType modAttrType = modAttr.getAttributeType();
-      if (modAttrType.equals(indexConfig.getAttributeType()))
+      if (modAttrType.equals(attributeType))
       {
         switch (mod.getModificationType())
         {

--
Gitblit v1.10.0