From 196ca99c14ab4aeee0c76c90fce0b72ab4e102f4 Mon Sep 17 00:00:00 2001
From: coulbeck <coulbeck@localhost>
Date: Thu, 01 Mar 2007 19:30:17 +0000
Subject: [PATCH] Make AciList (the ACI cache) a copy-on-write class, such that there is no locking when reading the ACI cache. Remove the linked list field from the Aci class and use the standard LinkedList instead.

---
 opends/src/server/org/opends/server/authorization/dseecompat/Aci.java |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/opends/src/server/org/opends/server/authorization/dseecompat/Aci.java b/opends/src/server/org/opends/server/authorization/dseecompat/Aci.java
index e7c7f22..e881dd8 100644
--- a/opends/src/server/org/opends/server/authorization/dseecompat/Aci.java
+++ b/opends/src/server/org/opends/server/authorization/dseecompat/Aci.java
@@ -32,6 +32,7 @@
 import static org.opends.server.messages.MessageHandler.*;
 import static org.opends.server.authorization.dseecompat.AciMessages.*;
 import java.util.regex.Pattern;
+
 /**
  * The Aci class represents ACI strings.
  */
@@ -41,28 +42,24 @@
      * pairs.
      */
     private AciBody body;
+
     /*
      * The ACI targets.
      */
     private AciTargets targets=null;
-    /**
-     * The ACIs are on a linked list hashed by the ACI entry DN.
-     * Next points to the next Aci object in the list.
-     */
-    /*
-     * TODO Remove this linked list an replace with an array
-     * of ACIs.
-     */
-    Aci next = null;
+
     /**
      * Version that we support.
      */
     public static final String supportedVersion="3.0";
+
     private String aciString;
+
     /*
      * The DN of the entry containing this ACI.
      */
     private DN dn;
+
     /*
      * This regular expression is used to do a quick syntax check
      * when an ACI is being decoded.
@@ -97,7 +94,7 @@
     public static Aci decode (ByteString byteString, DN dn)
     throws AciException {
         String input=byteString.stringValue();
-        //Perform an quick pattern check against the string to catch any
+        //Perform a quick pattern check against the string to catch any
         //obvious syntax errors.
         if (!Pattern.matches(aciRegex, input)) {
             int msgID = MSGID_ACI_SYNTAX_GENERAL_PARSE_FAILED;

--
Gitblit v1.10.0