[jbosscache-commits] JBoss Cache SVN: r5663 - in core/trunk/src/main/java/org/jboss/cache: interceptors and 1 other directory.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Thu Apr 24 09:59:14 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-04-24 09:59:14 -0400 (Thu, 24 Apr 2008)
New Revision: 5663

Modified:
   core/trunk/src/main/java/org/jboss/cache/InvocationContext.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
Log:
Updated calls to broken getMethodCall()

Modified: core/trunk/src/main/java/org/jboss/cache/InvocationContext.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/InvocationContext.java	2008-04-24 13:54:41 UTC (rev 5662)
+++ core/trunk/src/main/java/org/jboss/cache/InvocationContext.java	2008-04-24 13:59:14 UTC (rev 5663)
@@ -361,6 +361,7 @@
    /**
     * @return the method call associated with this invocation
     */
+   @Deprecated
    public MethodCall getMethodCall()
    {
       if (methodCall == null)
@@ -384,8 +385,9 @@
     * Sets the method call associated with this invocation.
     *
     * @param methodCall methodcall to set
-    * @deprecated not used anymore, use {@link #getExecutingCommand()}
+    * @deprecated not used anymore.  Interceptors will get a {@link org.jboss.cache.commands.CacheCommand} instance passed in along with an InvocationContext.
     */
+   @Deprecated
    public void setMethodCall(MethodCall methodCall)
    {
       this.methodCall = methodCall;

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java	2008-04-24 13:54:41 UTC (rev 5662)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java	2008-04-24 13:59:14 UTC (rev 5663)
@@ -17,7 +17,6 @@
 import org.jboss.cache.loader.CacheLoaderManager;
 import org.jboss.cache.lock.LockManager;
 import org.jboss.cache.lock.NodeLock;
-import org.jboss.cache.marshall.MethodCall;
 import org.jboss.cache.notifications.Notifier;
 import org.jboss.cache.transaction.GlobalTransaction;
 import org.jboss.cache.transaction.TransactionEntry;
@@ -86,7 +85,7 @@
    {
       if (command.getFqn() != null)
       {
-         loadIfNeeded(ctx, command.getFqn(), null, false, true, false, ctx.getMethodCall(), txTable.get(ctx.getGlobalTransaction()), false, false, false);
+         loadIfNeeded(ctx, command.getFqn(), null, false, true, false, txTable.get(ctx.getGlobalTransaction()), false, false, false);
       }
       return invokeNextInterceptor(ctx, command);
    }
@@ -96,7 +95,7 @@
    {
       if (command.getFqn() != null)
       {
-         loadIfNeeded(ctx, command.getFqn(), command.getKey(), false, useCacheStore, !useCacheStore, ctx.getMethodCall(), txTable.get(ctx.getGlobalTransaction()), false, false, false);
+         loadIfNeeded(ctx, command.getFqn(), command.getKey(), false, useCacheStore, !useCacheStore, txTable.get(ctx.getGlobalTransaction()), false, false, false);
       }
       return invokeNextInterceptor(ctx, command);
    }
@@ -108,9 +107,9 @@
       {
          if (command.getTo() != null)
          {
-            loadIfNeeded(ctx, command.getTo(), null, false, false, true, ctx.getMethodCall(), txTable.get(ctx.getGlobalTransaction()), false, true, false);
+            loadIfNeeded(ctx, command.getTo(), null, false, false, true, txTable.get(ctx.getGlobalTransaction()), false, true, false);
          }
-         loadIfNeeded(ctx, command.getFqn(), null, false, false, true, ctx.getMethodCall(), txTable.get(ctx.getGlobalTransaction()), true, true, false);
+         loadIfNeeded(ctx, command.getFqn(), null, false, false, true, txTable.get(ctx.getGlobalTransaction()), true, true, false);
       }
       return invokeNextInterceptor(ctx, command);
    }
@@ -120,7 +119,7 @@
    {
       if (command.getFqn() != null)
       {
-         loadIfNeeded(ctx, command.getFqn(), command.getKey(), false, false, true, ctx.getMethodCall(), txTable.get(ctx.getGlobalTransaction()), false, false, false);
+         loadIfNeeded(ctx, command.getFqn(), command.getKey(), false, false, true, txTable.get(ctx.getGlobalTransaction()), false, false, false);
       }
       return invokeNextInterceptor(ctx, command);
    }
@@ -131,7 +130,7 @@
    {
       if (command.getFqn() != null)
       {
-         loadIfNeeded(ctx, command.getFqn(), null, false, false, true, ctx.getMethodCall(), txTable.get(ctx.getGlobalTransaction()), false, false, !usingOptimisticInvalidation);
+         loadIfNeeded(ctx, command.getFqn(), null, false, false, true, txTable.get(ctx.getGlobalTransaction()), false, false, !usingOptimisticInvalidation);
       }
       return invokeNextInterceptor(ctx, command);
    }
@@ -142,7 +141,7 @@
       Fqn fqn = command.getFqn();
       if (fqn != null)
       {
-         loadIfNeeded(ctx, fqn, null, false, false, false, ctx.getMethodCall(), txTable.get(ctx.getGlobalTransaction()), false, false, true);
+         loadIfNeeded(ctx, fqn, null, false, false, false, txTable.get(ctx.getGlobalTransaction()), false, false, true);
          NodeSPI n = cacheData.peek(fqn, true, true);
          loadChildren(fqn, n, false, false, ctx);
       }
@@ -155,7 +154,7 @@
    {
       if (command.getFqn() != null)
       {
-         loadIfNeeded(ctx, command.getFqn(), null, true, false, true, ctx.getMethodCall(), txTable.get(ctx.getGlobalTransaction()), false, false, false);
+         loadIfNeeded(ctx, command.getFqn(), null, true, false, true, txTable.get(ctx.getGlobalTransaction()), false, false, false);
       }
       return invokeNextInterceptor(ctx, command);
    }
@@ -165,7 +164,7 @@
    {
       if (command.getFqn() != null)
       {
-         loadIfNeeded(ctx, command.getFqn(), null, true, false, true, ctx.getMethodCall(), txTable.get(ctx.getGlobalTransaction()), false, false, false);
+         loadIfNeeded(ctx, command.getFqn(), null, true, false, true, txTable.get(ctx.getGlobalTransaction()), false, false, false);
       }
       return invokeNextInterceptor(ctx, command);
    }
@@ -202,7 +201,7 @@
    {
       if (config.isNodeLockingOptimistic() && command.getFqn() != null)
       {
-         loadIfNeeded(ctx, command.getFqn(), null, false, false, false, ctx.getMethodCall(), txTable.get(ctx.getGlobalTransaction()), false, false, false);
+         loadIfNeeded(ctx, command.getFqn(), null, false, false, false, txTable.get(ctx.getGlobalTransaction()), false, false, false);
       }
       return invokeNextInterceptor(ctx, command);
    }
@@ -212,7 +211,7 @@
    {
       if (command.getFqn() != null && !useCacheStore)
       {
-         loadIfNeeded(ctx, command.getFqn(), command.getKey(), false, false, false, ctx.getMethodCall(), txTable.get(ctx.getGlobalTransaction()), false, false, false);
+         loadIfNeeded(ctx, command.getFqn(), command.getKey(), false, false, false, txTable.get(ctx.getGlobalTransaction()), false, false, false);
       }
       return invokeNextInterceptor(ctx, command);
    }
@@ -223,12 +222,12 @@
       Fqn fqn = command.getFqn();
       if (fqn != null && !useCacheStore)
       {
-         loadIfNeeded(ctx, fqn, null, false, true, false, ctx.getMethodCall(), txTable.get(ctx.getGlobalTransaction()), false, false, false);
+         loadIfNeeded(ctx, fqn, null, false, true, false, txTable.get(ctx.getGlobalTransaction()), false, false, false);
       }
       return invokeNextInterceptor(ctx, command);
    }
 
-   private void loadIfNeeded(InvocationContext ctx, Fqn fqn, Object key, boolean allKeys, boolean initNode, boolean acquireLock, MethodCall m, TransactionEntry entry, boolean recursive, boolean isMove, boolean bypassLoadingData) throws Throwable
+   private void loadIfNeeded(InvocationContext ctx, Fqn fqn, Object key, boolean allKeys, boolean initNode, boolean acquireLock, TransactionEntry entry, boolean recursive, boolean isMove, boolean bypassLoadingData) throws Throwable
    {
       NodeSPI n = cacheData.peek(fqn, true, true);
 




More information about the jbosscache-commits mailing list