[jboss-cvs] JBossCache/src/org/jboss/cache/buddyreplication ...
Manik Surtani
manik at jboss.org
Mon Mar 12 19:05:22 EDT 2007
User: msurtani
Date: 07/03/12 19:05:22
Modified: src/org/jboss/cache/buddyreplication BuddyManager.java
Log:
refactorings
Revision Changes Path
1.68 +8 -6 JBossCache/src/org/jboss/cache/buddyreplication/BuddyManager.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BuddyManager.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/buddyreplication/BuddyManager.java,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- BuddyManager.java 12 Mar 2007 21:56:26 -0000 1.67
+++ BuddyManager.java 12 Mar 2007 23:05:22 -0000 1.68
@@ -32,13 +32,14 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Vector;
import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
@@ -76,19 +77,20 @@
/**
* Map of buddy pools received from broadcasts
*/
- final Map<Address, String> buddyPool = new HashMap<Address, String>();
+ final Map<Address, String> buddyPool = new ConcurrentHashMap<Address, String>();
/**
* The nullBuddyPool is a set of addresses that have not specified buddy pools.
*/
- final Set<Address> nullBuddyPool = new HashSet<Address>();
+ final Set<Address> nullBuddyPool = new CopyOnWriteArraySet<Address>();
/**
* Map of bddy groups the current instance participates in as a backup node.
* Keyed on String group name, values are BuddyGroup objects.
* Needs to deal with concurrent access - concurrent assignTo/removeFrom buddy grp
*/
- Map<String, BuddyGroup> buddyGroupsIParticipateIn = new HashMap<String, BuddyGroup>();
+ Map<String, BuddyGroup> buddyGroupsIParticipateIn = new ConcurrentHashMap() < String, BuddyGroup
+ >();
/**
* Queue to deal with queued up view change requests - which are handled asynchronously
More information about the jboss-cvs-commits
mailing list