CVS update: JGroups/src/org/jgroups/blocks LazyRemovalCache.java

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

  Modified:    src/org/jgroups/blocks LazyRemovalCache.java
  Log:
  use of Util.createConcurrentMap() instead of new ConcurrentHashMap()
  
  Revision  Changes    Path
  1.7       +4 -3      JGroups/src/org/jgroups/blocks/LazyRemovalCache.java
  
  Index: LazyRemovalCache.java
  ===================================================================
  RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/blocks/LazyRemovalCache.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- LazyRemovalCache.java	22 Apr 2010 12:13:06 -0000	1.6
  +++ LazyRemovalCache.java	17 Sep 2010 11:55:27 -0000	1.7
  @@ -1,7 +1,8 @@
   package org.jgroups.blocks;
   
  +import org.jgroups.util.Util;
  +
   import java.util.*;
  -import java.util.concurrent.ConcurrentHashMap;
   import java.util.concurrent.ConcurrentMap;
   
   /**
  @@ -10,10 +11,10 @@
    * configurable time are evicted. Elements are marked as removable by remove(), removeAll() and retainAll(). When
    * an elements is marked as removable, but later reinserted, the mark is removed.
    * @author Bela Ban
  - * @version $Id: LazyRemovalCache.java,v 1.6 2010/04/22 12:13:06 belaban Exp $
  + * @version $Id: LazyRemovalCache.java,v 1.7 2010/09/17 11:55:27 belaban Exp $
    */
   public class LazyRemovalCache<K,V> {
  -    private final ConcurrentMap<K,Entry<V>> map=new ConcurrentHashMap<K,Entry<V>>();
  +    private final ConcurrentMap<K, Entry<V>> map=Util.createConcurrentMap();
   
       /** Max number of elements, if exceeded, we remove all elements marked as removable and older than max_age ms */
       private final int max_elements;
  
  
  

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