From 7c774e1356257bd64273760740f2464f2d6661fb Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Tue, 09 Jan 2007 20:20:30 +0000
Subject: [PATCH] Update the schema backend to provide full support for online schema updates. which includes the following:

---
 opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java b/opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
index f1bcc1a..e238546 100644
--- a/opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
+++ b/opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
@@ -22,14 +22,16 @@
  * CDDL HEADER END
  *
  *
- *      Portions Copyright 2006 Sun Microsystems, Inc.
+ *      Portions Copyright 2006-2007 Sun Microsystems, Inc.
  */
 package org.opends.server.schema;
 
 
 
-import java.util.*;
-import java.util.concurrent.*;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
 
 import org.opends.server.api.ApproximateMatchingRule;
 import org.opends.server.api.AttributeSyntax;
@@ -490,13 +492,12 @@
     // out what it is and how to treat what comes after it, then repeat until
     // we get to the end of the value.  But before we start, set default values
     // for everything else we might need to know.
-    ConcurrentHashMap<String,String> names =
-         new ConcurrentHashMap<String,String>();
+    LinkedHashMap<String,String> names = new LinkedHashMap<String,String>();
     String description = null;
     boolean isObsolete = false;
-    CopyOnWriteArraySet<AttributeType> attributes = null;
-    ConcurrentHashMap<String,CopyOnWriteArrayList<String>> extraProperties =
-         new ConcurrentHashMap<String,CopyOnWriteArrayList<String>>();
+    LinkedHashSet<AttributeType> attributes = null;
+    LinkedHashMap<String,List<String>> extraProperties =
+         new LinkedHashMap<String,List<String>>();
 
     while (true)
     {
@@ -664,7 +665,7 @@
           attrs.add(attr);
         }
 
-        attributes = new CopyOnWriteArraySet<AttributeType>(attrs);
+        attributes = new LinkedHashSet<AttributeType>(attrs);
       }
       else
       {
@@ -672,8 +673,7 @@
         // either a single value in single quotes or an open parenthesis
         // followed by one or more values in single quotes separated by spaces
         // followed by a close parenthesis.
-        CopyOnWriteArrayList<String> valueList =
-             new CopyOnWriteArrayList<String>();
+        LinkedList<String> valueList = new LinkedList<String>();
         pos = readExtraParameterValues(valueStr, valueList, pos);
         extraProperties.put(tokenName, valueList);
       }
@@ -690,8 +690,9 @@
     }
 
 
-    return new MatchingRuleUse(matchingRule, names, description, isObsolete,
-                               attributes, extraProperties);
+    return new MatchingRuleUse(value.stringValue(), matchingRule, names,
+                               description, isObsolete, attributes,
+                               extraProperties);
   }
 
 
@@ -1110,7 +1111,7 @@
    *                              the value.
    */
   private static int readExtraParameterValues(String valueStr,
-                          CopyOnWriteArrayList<String> valueList, int startPos)
+                          List<String> valueList, int startPos)
           throws DirectoryException
   {
     assert debugEnter(CLASS_NAME, "readExtraParameterValues",

--
Gitblit v1.10.0