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

Manik Surtani manik at jboss.org
Fri Jul 13 08:37:02 EDT 2007


  User: msurtani
  Date: 07/07/13 08:37:02

  Modified:    src/org/jboss/cache/interceptors  CacheStoreInterceptor.java
  Log:
  JBCACHE-1120
  
  Revision  Changes    Path
  1.52      +20 -19    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.51
  retrieving revision 1.52
  diff -u -b -r1.51 -r1.52
  --- CacheStoreInterceptor.java	12 Jul 2007 16:34:51 -0000	1.51
  +++ CacheStoreInterceptor.java	13 Jul 2007 12:37:02 -0000	1.52
  @@ -5,6 +5,7 @@
   import org.jboss.cache.Fqn;
   import org.jboss.cache.InvocationContext;
   import org.jboss.cache.Modification;
  +import org.jboss.cache.NodeSPI;
   import org.jboss.cache.config.CacheLoaderConfig;
   import org.jboss.cache.loader.CacheLoader;
   import org.jboss.cache.marshall.MethodCall;
  @@ -27,7 +28,7 @@
    * through the CacheLoader, either after each method call (no TXs), or at TX commit.
    *
    * @author Bela Ban
  - * @version $Id: CacheStoreInterceptor.java,v 1.51 2007/07/12 16:34:51 msurtani Exp $
  + * @version $Id: CacheStoreInterceptor.java,v 1.52 2007/07/13 12:37:02 msurtani Exp $
    */
   public class CacheStoreInterceptor extends Interceptor implements CacheStoreInterceptorMBean
   {
  @@ -168,6 +169,9 @@
            case MethodDeclarations.removeDataMethodLocal_id:
               fqn = (Fqn) args[1];
               loader.removeData(fqn);
  +            // we need to mark this node as data loaded
  +            NodeSPI n = cache.peek(fqn, false);
  +            if (n != null) n.setDataLoaded(true);
               break;
         }
         //      }
  @@ -182,13 +186,10 @@
               doMove((Fqn) args[0], (Fqn) args[1]);
               break;
            case MethodDeclarations.putDataEraseMethodLocal_id:
  -            // aside from this removeData call, this is the same as a putData call.
  +            // aside from this removeData call, this is the same as a putData call.  Needed since CacheLoader.put(Map)
  +            // does not overwrite but append.
               loader.removeData((Fqn) args[1]);
            case MethodDeclarations.putDataMethodLocal_id:
  -//            Modification mod = convertMethodCallToModification(m);
  -//            log.debug(mod);
  -//            fqn = mod.getFqn();
  -//            loader.put(Collections.singletonList(mod));
               loader.put((Fqn) args[1], (Map) args[2]);
               if (configuration.getExposeManagementStatistics() && getStatisticsEnabled())
               {
  
  
  



More information about the jboss-cvs-commits mailing list