[jbosscache-commits] JBoss Cache SVN: r5543 - core/trunk/src/main/java/org/jboss/cache/interceptors.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Sat Apr 12 19:00:29 EDT 2008
Author: manik.surtani at jboss.com
Date: 2008-04-12 19:00:29 -0400 (Sat, 12 Apr 2008)
New Revision: 5543
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/ReplicationInterceptor.java
Log:
Clearer variable naming
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/ReplicationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/ReplicationInterceptor.java 2008-04-12 23:00:15 UTC (rev 5542)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/ReplicationInterceptor.java 2008-04-12 23:00:29 UTC (rev 5543)
@@ -2,7 +2,12 @@
import org.jboss.cache.InvocationContext;
import org.jboss.cache.commands.CacheCommand;
-import org.jboss.cache.commands.cachedata.*;
+import org.jboss.cache.commands.cachedata.MoveCommand;
+import org.jboss.cache.commands.cachedata.PutDataMapCommand;
+import org.jboss.cache.commands.cachedata.PutKeyValueCommand;
+import org.jboss.cache.commands.cachedata.RemoveDataCommand;
+import org.jboss.cache.commands.cachedata.RemoveKeyCommand;
+import org.jboss.cache.commands.cachedata.RemoveNodeCommand;
import org.jboss.cache.commands.remote.DataGravitationCleanupCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.PrepareCommand;
@@ -71,7 +76,8 @@
Object returnValue = invokeNextInterceptor(ctx, command);
transactionTable.get(command.getGlobalTransaction()).setForceAsyncReplication(true);
return returnValue;
- } else
+ }
+ else
{
return handleCrudMethod(ctx, command, command.isPutForExternalRead());
}
@@ -111,7 +117,7 @@
* If we are within one transaction we won't do any replication as replication would only be performed at commit time.
* If the operation didn't originate locally we won't do any replication either.
*/
- private Object handleCrudMethod(InvocationContext ctx, CacheCommand command, boolean async)
+ private Object handleCrudMethod(InvocationContext ctx, CacheCommand command, boolean forceAsync)
throws Throwable
{
if (skipReplication(ctx)) return invokeNextInterceptor(ctx, command);
@@ -125,11 +131,12 @@
config.getCacheMode() + ", exclude_self=" + true + ", timeout=" +
config.getSyncReplTimeout());
}
- if (!isSynchronous(ctx.getOptionOverrides()) || async)
+ if (!isSynchronous(ctx.getOptionOverrides()) || forceAsync)
{
// 2. Replicate change to all *other* members (exclude self !)
replicateCall(ctx, command, false, ctx.getOptionOverrides());
- } else
+ }
+ else
{
// REVISIT Needs to exclude itself and apply the local change manually.
// This is needed such that transient field is modified properly in-VM.
More information about the jbosscache-commits
mailing list