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

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

  Modified:    src/org/jgroups/blocks Cache.java
  Log:
  use of Util.createConcurrentMap() instead of new ConcurrentHashMap()
  
  Revision  Changes    Path
  1.15      +3 -2      JGroups/src/org/jgroups/blocks/Cache.java
  
  Index: Cache.java
  ===================================================================
  RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/blocks/Cache.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Cache.java	13 May 2009 13:06:54 -0000	1.14
  +++ Cache.java	17 Sep 2010 11:51:34 -0000	1.15
  @@ -6,6 +6,7 @@
   import org.jgroups.annotations.Unsupported;
   import org.jgroups.annotations.ManagedAttribute;
   import org.jgroups.annotations.ManagedOperation;
  +import org.jgroups.util.Util;
   
   import java.util.concurrent.*;
   import java.util.concurrent.atomic.AtomicBoolean;
  @@ -16,13 +17,13 @@
    * Simple cache which maintains keys and value. A reaper can be enabled which periodically evicts expired entries.
    * Also, when the cache is configured to be bounded, entries in excess of the max size will be evicted on put().
    * @author Bela Ban
  - * @version $Id: Cache.java,v 1.14 2009/05/13 13:06:54 belaban Exp $
  + * @version $Id: Cache.java,v 1.15 2010/09/17 11:51:34 belaban Exp $
    */
   @Experimental
   @Unsupported
   public class Cache<K,V> {
       private static final Log log=LogFactory.getLog(Cache.class);
  -    private final ConcurrentMap<K,Value<V>> map=new ConcurrentHashMap<K,Value<V>>();
  +    private final ConcurrentMap<K,Value<V>> map=Util.createConcurrentMap();
       private ScheduledThreadPoolExecutor timer=new ScheduledThreadPoolExecutor(1);
       private Future task=null;
       private final AtomicBoolean is_reaping=new AtomicBoolean(false);
  
  
  

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