[infinispan-commits] Infinispan SVN: r205 - in trunk/core/src/main/java/org/infinispan: invocation and 1 other directory.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Fri May 1 10:42:12 EDT 2009


Author: manik.surtani at jboss.com
Date: 2009-05-01 10:42:11 -0400 (Fri, 01 May 2009)
New Revision: 205

Modified:
   trunk/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java
   trunk/core/src/main/java/org/infinispan/invocation/Flag.java
Log:
SKIP _REMOTE_LOOKUP

Modified: trunk/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java	2009-04-30 18:46:02 UTC (rev 204)
+++ trunk/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java	2009-05-01 14:42:11 UTC (rev 205)
@@ -80,7 +80,7 @@
       Object returnValue = invokeNextInterceptor(ctx, command);
       // need to check in the context as well since a null retval is not necessarily an indication of the entry not being
       // available.  It could just have been removed in the same tx beforehand.
-      if (returnValue == null && ctx.lookupEntry(command.getKey()) == null)
+      if (!ctx.hasFlag(Flag.SKIP_REMOTE_LOOKUP) && returnValue == null && ctx.lookupEntry(command.getKey()) == null)
          returnValue = remoteGetAndStoreInL1(ctx, command.getKey());
       return returnValue;
    }
@@ -221,7 +221,7 @@
    }
 
    private boolean isNeedReliableReturnValues(InvocationContext ctx) {
-      return !ctx.hasFlag(Flag.UNSAFE_UNRELIABLE_RETURN_VALUES) && needReliableReturnValues;
+      return !ctx.hasFlag(Flag.SKIP_REMOTE_LOOKUP) && needReliableReturnValues;
    }
 
    /**

Modified: trunk/core/src/main/java/org/infinispan/invocation/Flag.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/invocation/Flag.java	2009-04-30 18:46:02 UTC (rev 204)
+++ trunk/core/src/main/java/org/infinispan/invocation/Flag.java	2009-05-01 14:42:11 UTC (rev 205)
@@ -15,9 +15,10 @@
  * #FORCE_ASYNCHRONOUS} - forces asynchronous network calls where possible</li> <li>{@link #FORCE_SYNCHRONOUS} - forces
  * synchronous network calls where possible</li> <li>{@link #SKIP_CACHE_STORE} - skips storing an entry to any
  * configured {@link org.infinispan.loader.CacheStore}s</li> <li>{@link #FAIL_SILENTLY} - swallows any exceptions,
- * logging them instead at a low log level</li> <li>{@link #UNSAFE_UNRELIABLE_RETURN_VALUES} - when used with DIST cache
- * mode, will skip retrieving a remote value before overwriting it, rendering return values for some operations (such as
- * {@link org.infinispan.Cache#put(Object, Object)} or {@link org.infinispan.Cache#remove(Object)} unusable.</li> </ul>
+ * logging them instead at a low log level</li> <li>{@link #SKIP_REMOTE_LOOKUP} - when used with DIST cache mode, will
+ * skip retrieving a remote value either when doing a get() or exists(), or to provide an overwritten value with a put()
+ * or remove().  This could render return values for some operations (such as {@link org.infinispan.Cache#put(Object,
+ * Object)} or {@link org.infinispan.Cache#remove(Object)} unusable.</li> </ul>
  *
  * @author Manik Surtani
  * @since 4.0
@@ -32,5 +33,5 @@
    FORCE_SYNCHRONOUS,
    SKIP_CACHE_STORE,
    FAIL_SILENTLY,
-   UNSAFE_UNRELIABLE_RETURN_VALUES
+   SKIP_REMOTE_LOOKUP
 }




More information about the infinispan-commits mailing list