CVS update: JGroups/src/org/jgroups/protocols FD_ALL.java FC.java
"Bela Ban" <[email protected]> Fri, 17 Sep 2010 11:52:58 +0000
| Newsgroups | gmane.comp.java.javagroups.cvs |
|---|---|
| Message-ID | <[email protected]> |
User: belaban
Date: 10/09/17 11:52:58
Modified: src/org/jgroups/protocols FD_ALL.java FC.java
Log:
use of Util.createConcurrentMap() instead of new ConcurrentHashMap()
Revision Changes Path
1.36 +6 -5 JGroups/src/org/jgroups/protocols/FD_ALL.java
Index: FD_ALL.java
===================================================================
RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/protocols/FD_ALL.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- FD_ALL.java 20 Jul 2010 10:31:00 -0000 1.35
+++ FD_ALL.java 17 Sep 2010 11:52:58 -0000 1.36
@@ -12,7 +12,6 @@
import java.io.IOException;
import java.util.*;
import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
@@ -26,7 +25,7 @@
* expired members, and suspect those.
*
* @author Bela Ban
- * @version $Id: FD_ALL.java,v 1.35 2010/07/20 10:31:00 belaban Exp $
+ * @version $Id: FD_ALL.java,v 1.36 2010/09/17 11:52:58 belaban Exp $
*/
@MBean(description="Failure detection based on simple heartbeat protocol")
@DeprecatedProperty(names={"shun"})
@@ -57,9 +56,11 @@
/* --------------------------------------------- Fields ------------------------------------------------------ */
-
- /** Map of addresses and timestamps of last updates */
- private final Map<Address,Long> timestamps=new ConcurrentHashMap<Address,Long>();
+
+ /**
+ * Map of addresses and timestamps of last updates
+ */
+ private final Map<Address, Long> timestamps=Util.createConcurrentMap();
private Address local_addr=null;
1.129 +3 -4 JGroups/src/org/jgroups/protocols/FC.java
Index: FC.java
===================================================================
RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/protocols/FC.java,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -r1.128 -r1.129
--- FC.java 30 Aug 2010 14:11:45 -0000 1.128
+++ FC.java 17 Sep 2010 11:52:58 -0000 1.129
@@ -10,7 +10,6 @@
import org.jgroups.util.Util;
import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
@@ -36,7 +35,7 @@
* <li>Receivers don't send the full credits (max_credits), but rather tha actual number of bytes received
* <ol/>
* @author Bela Ban
- * @version $Id: FC.java,v 1.128 2010/08/30 14:11:45 belaban Exp $
+ * @version $Id: FC.java,v 1.129 2010/09/17 11:52:58 belaban Exp $
*/
@MBean(description="Simple flow control protocol based on a credit system")
public class FC extends Protocol {
@@ -126,7 +125,7 @@
* currently used as there might be null values
*/
@GuardedBy("lock")
- private final ConcurrentMap<Address,Credit> sent=new ConcurrentHashMap<Address,Credit>(11);
+ private final ConcurrentMap<Address,Credit> sent=Util.createConcurrentMap();
/**
* Keeps track of credits / member at the receiver's side. Keys are members, values are credits left (in bytes).
@@ -134,7 +133,7 @@
* When the credits fall below the threshold, we refill and send a REPLENISH message to the sender.
* The sender blocks until REPLENISH message is received.
*/
- private final ConcurrentMap<Address,Credit> received=new ConcurrentHashMap<Address,Credit>(11);
+ private final ConcurrentMap<Address,Credit> received=Util.createConcurrentMap();
/**
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev