[jboss-cvs] JBossCache/src/org/jboss/cache/pojo/impl ...

Manik Surtani manik at jboss.org
Wed May 23 11:22:05 EDT 2007


  User: msurtani
  Date: 07/05/23 11:22:05

  Modified:    src/org/jboss/cache/pojo/impl  PojoCacheImpl.java
  Log:
  Performance enhancements, including a new invoke() signature for Interceptor
  
  Revision  Changes    Path
  1.9       +9 -11     JBossCache/src/org/jboss/cache/pojo/impl/PojoCacheImpl.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PojoCacheImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/pojo/impl/PojoCacheImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- PojoCacheImpl.java	23 May 2007 10:28:49 -0000	1.8
  +++ PojoCacheImpl.java	23 May 2007 15:22:04 -0000	1.9
  @@ -30,7 +30,6 @@
   import org.jboss.cache.pojo.notification.DetachNotification;
   import org.jboss.cache.pojo.notification.Notification;
   import org.jboss.cache.pojo.notification.NotificationContext;
  -import org.jboss.cache.util.concurrent.ConcurrentHashSet;
   
   import java.util.Collection;
   import java.util.Collections;
  @@ -38,12 +37,13 @@
   import java.util.Map;
   import java.util.Set;
   import java.util.WeakHashMap;
  +import java.util.concurrent.CopyOnWriteArraySet;
   
   /**
    * Implementation class for PojoCache interface
    *
    * @author Ben Wang
  - * @version $Id: PojoCacheImpl.java,v 1.8 2007/05/23 10:28:49 msurtani Exp $
  + * @version $Id: PojoCacheImpl.java,v 1.9 2007/05/23 15:22:04 msurtani Exp $
    */
   public class PojoCacheImpl implements PojoCache
   {
  @@ -60,9 +60,7 @@
       *
       * @see #addListener
       */
  -   // CopyOnWriteArraySet is hugely inefficient when there are several writes to it.  I've implemented a ConcurrentHashSet,
  -   // similar to a ConcurrentHashMap, which uses lock striping and is more performant. - Manik
  -   private final Set listeners = new ConcurrentHashSet();
  +   private final Set listeners = new CopyOnWriteArraySet();
      /**
       * True if listeners are initialized.
       */
  
  
  



More information about the jboss-cvs-commits mailing list