[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...

Manik Surtani manik at jboss.org
Fri Jul 13 10:31:42 EDT 2007


  User: msurtani
  Date: 07/07/13 10:31:42

  Modified:    src/org/jboss/cache/interceptors  
                        PassivationInterceptor.java
                        ActivationInterceptor.java
  Log:
  Remove unnecessary sync
  
  Revision  Changes    Path
  1.44      +13 -12    JBossCache/src/org/jboss/cache/interceptors/PassivationInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PassivationInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/PassivationInterceptor.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -b -r1.43 -r1.44
  --- PassivationInterceptor.java	28 Jun 2007 16:53:37 -0000	1.43
  +++ PassivationInterceptor.java	13 Jul 2007 14:31:42 -0000	1.44
  @@ -18,7 +18,7 @@
    * CacheLoader, either before each method call (no TXs), or at TX commit.
    *
    * @author <a href="mailto:{hmesha at novell.com}">{Hany Mesha}</a>
  - * @version $Id: PassivationInterceptor.java,v 1.43 2007/06/28 16:53:37 msurtani Exp $
  + * @version $Id: PassivationInterceptor.java,v 1.44 2007/07/13 14:31:42 msurtani Exp $
    */
   public class PassivationInterceptor extends Interceptor implements PassivationInterceptorMBean
   {
  @@ -26,7 +26,7 @@
      protected CacheLoader loader = null;
      private AtomicLong m_passivations = new AtomicLong(0);
   
  -   public synchronized void setCache(CacheSPI cache)
  +   public void setCache(CacheSPI cache)
      {
         super.setCache(cache);
         this.loader = cache.getCacheLoaderManager().getCacheLoader();
  @@ -53,8 +53,9 @@
            Fqn fqn = (Fqn) args[0];
            try
            {
  -            synchronized (this)
  -            {
  +            // synchronizations now handled in the cache loader implementation
  +//            synchronized (this)
  +//            {
                  // evict method local doesn't hold attributes therefore we have 
                  // to get them manually
                  Map attributes = getNodeAttributes(fqn);
  @@ -64,7 +65,7 @@
                  loader.put(fqn, attributes);
   
                  cache.getNotifier().notifyNodePassivated(fqn, false, Collections.emptyMap(), ctx);
  -            }
  +//            }
   
               if (getStatisticsEnabled() && configuration.getExposeManagementStatistics())
               {
  
  
  
  1.60      +32 -31    JBossCache/src/org/jboss/cache/interceptors/ActivationInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ActivationInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/ActivationInterceptor.java,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -b -r1.59 -r1.60
  --- ActivationInterceptor.java	12 Jul 2007 14:29:05 -0000	1.59
  +++ ActivationInterceptor.java	13 Jul 2007 14:31:42 -0000	1.60
  @@ -26,7 +26,7 @@
    * their attributes have been initialized and their children have been loaded in memory.
    *
    * @author <a href="mailto:{hmesha at novell.com}">{Hany Mesha}</a>
  - * @version $Id: ActivationInterceptor.java,v 1.59 2007/07/12 14:29:05 msurtani Exp $
  + * @version $Id: ActivationInterceptor.java,v 1.60 2007/07/13 14:31:42 msurtani Exp $
    */
   public class ActivationInterceptor extends CacheLoaderInterceptor implements ActivationInterceptorMBean
   {
  @@ -139,8 +139,9 @@
               break;
         }
   
  -      synchronized (this)
  -      {
  +      // synchronizations now handled in the cache loader implementation
  +//      synchronized (this)
  +//      {
            if (fqn != null)
            {
               if (nodeRemoved)
  @@ -179,7 +180,7 @@
                  }
               }
            }
  -      }
  +//      }
         return retval;
      }
   
  
  
  



More information about the jboss-cvs-commits mailing list