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

Jimmy Wilson jawilson at redhat.com
Sun Jun 24 16:06:26 EDT 2007


  User: jawilson
  Date: 07/06/24 16:06:26

  Modified:    src/org/jboss/cache/interceptors    Tag:
                        Branch_JBossCache_1_4_0 CacheStoreInterceptor.java
                        CacheLoaderInterceptor.java
  Removed:     src/org/jboss/cache/interceptors    Tag:
                        Branch_JBossCache_1_4_0
                        BaseCacheLoaderInterceptor.java
  Log:
  Fix for [JBCACHE-1103].  Cache Loaders need to control locking when needed, not their interceptor counterpart.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.26.2.1  +9 -14     JBossCache/src/org/jboss/cache/interceptors/CacheStoreInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheStoreInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheStoreInterceptor.java,v
  retrieving revision 1.26
  retrieving revision 1.26.2.1
  diff -u -b -r1.26 -r1.26.2.1
  --- CacheStoreInterceptor.java	12 Jun 2006 20:24:31 -0000	1.26
  +++ CacheStoreInterceptor.java	24 Jun 2007 20:06:26 -0000	1.26.2.1
  @@ -25,9 +25,9 @@
    * Writes modifications back to the store on the way out: stores modifications back
    * through the CacheLoader, either after each method call (no TXs), or at TX commit.
    * @author Bela Ban
  - * @version $Id: CacheStoreInterceptor.java,v 1.26 2006/06/12 20:24:31 msurtani Exp $
  + * @version $Id: CacheStoreInterceptor.java,v 1.26.2.1 2007/06/24 20:06:26 jawilson Exp $
    */
  -public class CacheStoreInterceptor extends BaseCacheLoaderInterceptor implements CacheStoreInterceptorMBean
  +public class CacheStoreInterceptor extends CacheLoaderInterceptor implements CacheStoreInterceptorMBean
   {
   
      protected CacheLoaderConfig loaderConfig = null;
  @@ -96,7 +96,6 @@
                       }
                       finally
                       {
  -                        releaseLoaderLocks(fqnsModified);
                           preparingTxs.remove(gtx);
                       }
                       if (cache.getUseInterceptorMbeans()&& statsEnabled) {
  @@ -144,20 +143,18 @@
          {
             case MethodDeclarations.removeNodeMethodLocal_id:
                fqn=(Fqn)args[1];
  -             obtainLoaderLock(fqn);
                try
                {
                   loader.remove(fqn);
                }
                finally
                {
  -                releaseLoaderLock(fqn);
  +                //releaseLoaderLock(fqn);
                }
                break;
             case MethodDeclarations.removeKeyMethodLocal_id:
                fqn=(Fqn)args[1];
                key=args[2];
  -             obtainLoaderLock(fqn);
                try
                {
                   tmp_retval=loader.remove(fqn, key);
  @@ -165,19 +162,18 @@
                }
                finally
                {
  -                releaseLoaderLock(fqn);
  +                //releaseLoaderLock(fqn);
                }
                break;
             case MethodDeclarations.removeDataMethodLocal_id:
                fqn=(Fqn)args[1];
  -             obtainLoaderLock(fqn);
                try
                {
                    loader.removeData(fqn);
                }
                finally
                {
  -                 releaseLoaderLock(fqn);
  +                 //releaseLoaderLock(fqn);
                }
                break;
          }
  @@ -194,14 +190,14 @@
               Modification mod = convertMethodCallToModification(m);
               log.debug(mod);
               fqn = mod.getFqn();
  -            obtainLoaderLock(fqn);
  +
               try
               {
                   loader.put(Collections.singletonList(mod));
               }
               finally
               {
  -                releaseLoaderLock(fqn);
  +                //releaseLoaderLock(fqn);
               }
               if (cache.getUseInterceptorMbeans()&& statsEnabled)
                  m_cacheStores++;
  @@ -210,7 +206,6 @@
               fqn=(Fqn)args[1];
               key=args[2];
               value=args[3];
  -             obtainLoaderLock(fqn);
                try
                {
                    tmp_retval = loader.put(fqn, key, value);
  @@ -218,7 +213,7 @@
                }
                finally
                {
  -                 releaseLoaderLock(fqn);
  +                 //releaseLoaderLock(fqn);
                }
                if (cache.getUseInterceptorMbeans()&& statsEnabled)
                   m_cacheStores++;
  
  
  
  1.40.2.3  +3 -4      JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheLoaderInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java,v
  retrieving revision 1.40.2.2
  retrieving revision 1.40.2.3
  diff -u -b -r1.40.2.2 -r1.40.2.3
  --- CacheLoaderInterceptor.java	2 Nov 2006 15:34:06 -0000	1.40.2.2
  +++ CacheLoaderInterceptor.java	24 Jun 2007 20:06:26 -0000	1.40.2.3
  @@ -29,9 +29,9 @@
    * Loads nodes that don't exist at the time of the call into memory from the CacheLoader
    *
    * @author Bela Ban
  - * @version $Id: CacheLoaderInterceptor.java,v 1.40.2.2 2006/11/02 15:34:06 msurtani Exp $
  + * @version $Id: CacheLoaderInterceptor.java,v 1.40.2.3 2007/06/24 20:06:26 jawilson Exp $
    */
  -public class CacheLoaderInterceptor extends BaseCacheLoaderInterceptor implements CacheLoaderInterceptorMBean
  +public class CacheLoaderInterceptor extends CacheLoaderInterceptor implements CacheLoaderInterceptorMBean
   {
      private boolean isCustomCacheLoader;
      private long m_cacheLoads = 0;
  @@ -165,7 +165,6 @@
         if (fqn != null)
         {
   
  -         obtainLoaderLock(fqn);
            try
            {
   
  @@ -204,7 +203,7 @@
            }
            finally
            {
  -            releaseLoaderLock(fqn);
  +            //releaseLoaderLock(fqn);
            }
   
         }
  
  
  



More information about the jboss-cvs-commits mailing list