directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r777089 - /directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultOidRegistry.java
Date Thu, 21 May 2009 12:04:25 GMT
Author: elecharny
Date: Thu May 21 12:04:25 2009
New Revision: 777089

URL: http://svn.apache.org/viewvc?rev=777089&view=rev
Log:
Replaced the HashMap by ConcurrentHashMap : it should speed up concurrent access to the oid
registry

Modified:
    directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultOidRegistry.java

Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultOidRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultOidRegistry.java?rev=777089&r1=777088&r2=777089&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultOidRegistry.java
(original)
+++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultOidRegistry.java
Thu May 21 12:04:25 2009
@@ -22,10 +22,10 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.naming.NamingException;
 import javax.naming.directory.NoSuchAttributeException;
@@ -84,10 +84,10 @@
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
     
     /** Maps OID to a name or a list of names if more than one name exists */
-    private Map<String, List<String>> byOid = new HashMap<String, List<String>>();
+    private Map<String, List<String>> byOid = new ConcurrentHashMap<String,
List<String>>();
     
     /** Maps several names to an OID */
-    private Map<String,String> byName = new HashMap<String,String>();
+    private Map<String,String> byName = new ConcurrentHashMap<String,String>();
 
 
     /**



Mime
View raw message