CVS update: JGroups/src/org/jgroups/stack AckReceiverWindow.java

"Bela Ban" <[email protected]> Fri, 17 Sep 2010 11:50:37 +0000
Newsgroups gmane.comp.java.javagroups.cvs
Message-ID <[email protected]>
  User: belaban 
  Date: 10/09/17 11:50:37

  Modified:    src/org/jgroups/stack AckReceiverWindow.java
  Log:
  use of Util.createConcurrentMap() instead of new ConcurrentHashMap()
  
  Revision  Changes    Path
  1.52      +6 -4      JGroups/src/org/jgroups/stack/AckReceiverWindow.java
  
  Index: AckReceiverWindow.java
  ===================================================================
  RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/stack/AckReceiverWindow.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- AckReceiverWindow.java	23 Mar 2010 16:09:54 -0000	1.51
  +++ AckReceiverWindow.java	17 Sep 2010 11:50:37 -0000	1.52
  @@ -3,9 +3,11 @@
   
   import org.jgroups.Message;
   import org.jgroups.util.Tuple;
  +import org.jgroups.util.Util;
   
  -import java.util.*;
  -import java.util.concurrent.ConcurrentHashMap;
  +import java.util.Collections;
  +import java.util.LinkedList;
  +import java.util.List;
   import java.util.concurrent.ConcurrentMap;
   import java.util.concurrent.atomic.AtomicBoolean;
   import java.util.concurrent.atomic.AtomicInteger;
  @@ -23,12 +25,12 @@
    * a sorted set incurs overhead.
    *
    * @author Bela Ban
  - * @version $Id: AckReceiverWindow.java,v 1.51 2010/03/23 16:09:54 belaban Exp $
  + * @version $Id: AckReceiverWindow.java,v 1.52 2010/09/17 11:50:37 belaban Exp $
    */
   public class AckReceiverWindow {
       private final AtomicLong                   next_to_remove;
       private final AtomicBoolean                processing=new AtomicBoolean(false);
  -    private final ConcurrentMap<Long,Segment>  segments=new ConcurrentHashMap<Long,Segment>(64, 0.75F, 64);
  +    private final ConcurrentMap<Long,Segment>  segments=Util.createConcurrentMap();
       private volatile Segment                   current_segment=null;
       private volatile Segment                   current_remove_segment=null;
       private final int                          segment_capacity;
  
  
  

------------------------------------------------------------------------------
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