river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter_firmst...@apache.org
Subject svn commit: r1502151 - /river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java
Date Thu, 11 Jul 2013 08:34:54 GMT
Author: peter_firmstone
Date: Thu Jul 11 08:34:53 2013
New Revision: 1502151

URL: http://svn.apache.org/r1502151
Log:
Temporary commit to test if maps used in reggie are being accessed safely for Jenkins tests.

Modified:
    river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java

Modified: river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java?rev=1502151&r1=1502150&r2=1502151&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java Thu Jul
11 08:34:53 2013
@@ -87,7 +87,9 @@ import java.security.PrivilegedException
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.SortedMap;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.ConcurrentSkipListMap;
 import javax.net.ServerSocketFactory;
 import javax.net.SocketFactory;
 import javax.security.auth.Subject;
@@ -205,7 +207,7 @@ class RegistrarImpl implements Registrar
      * Map from ServiceID to SvcReg.  Every service is in this map under
      * its serviceID.
      */
-    private final Map<ServiceID,SvcReg> serviceByID = new HashMap<ServiceID,SvcReg>();
+    private final Map<ServiceID,SvcReg> serviceByID = new ConcurrentHashMap<ServiceID,SvcReg>();
     /**
      * Identity map from SvcReg to SvcReg, ordered by lease expiration.
      * Every service is in this map.
@@ -244,12 +246,12 @@ class RegistrarImpl implements Registrar
      * Map from Long(eventID) to EventReg.  Every event registration is in
      * this map under its eventID.
      */
-    private final Map<Long,EventReg> eventByID = new HashMap<Long,EventReg>(11);
+    private final Map<Long,EventReg> eventByID = new ConcurrentHashMap<Long,EventReg>(11);
     /**
      * Identity map from EventReg to EventReg, ordered by lease expiration.
      * Every event registration is in this map.
      */
-    private final SortedMap<EventReg,EventReg> eventByTime = new TreeMap<EventReg,EventReg>();
+    private final SortedMap<EventReg,EventReg> eventByTime = new ConcurrentSkipListMap<EventReg,EventReg>();
     /**
      * Map from ServiceID to EventReg or EventReg[].  An event
      * registration is in this map if its template matches on (at least)



Mime
View raw message