Author: manik.surtani(a)jboss.com
Date: 2008-05-19 10:08:07 -0400 (Mon, 19 May 2008)
New Revision: 5875
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/write/PutForExternalReadCommand.java
core/trunk/src/main/java/org/jboss/cache/interceptors/ActivationInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/InvocationContextInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
core/trunk/src/test/java/org/jboss/cache/api/pfer/PutForExternalReadTestBase.java
Log:
Fixed PFER breakages
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/write/PutForExternalReadCommand.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/commands/write/PutForExternalReadCommand.java 2008-05-19
13:03:46 UTC (rev 5874)
+++
core/trunk/src/main/java/org/jboss/cache/commands/write/PutForExternalReadCommand.java 2008-05-19
14:08:07 UTC (rev 5875)
@@ -1,6 +1,8 @@
package org.jboss.cache.commands.write;
import org.jboss.cache.Fqn;
+import org.jboss.cache.InvocationContext;
+import org.jboss.cache.commands.Visitor;
import org.jboss.cache.transaction.GlobalTransaction;
/**
@@ -42,4 +44,10 @@
{
return commandId == VERSIONED_METHOD_ID;
}
+
+ @Override
+ public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
+ {
+ return visitor.visitPutForExternalReadCommand(ctx, this);
+ }
}
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/ActivationInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/ActivationInterceptor.java 2008-05-19
13:03:46 UTC (rev 5874)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/ActivationInterceptor.java 2008-05-19
14:08:07 UTC (rev 5875)
@@ -13,6 +13,7 @@
import org.jboss.cache.commands.tx.PrepareCommand;
import org.jboss.cache.commands.write.MoveCommand;
import org.jboss.cache.commands.write.PutDataMapCommand;
+import org.jboss.cache.commands.write.PutForExternalReadCommand;
import org.jboss.cache.commands.write.PutKeyValueCommand;
import org.jboss.cache.commands.write.RemoveDataCommand;
import org.jboss.cache.commands.write.RemoveKeyCommand;
@@ -124,6 +125,12 @@
}
@Override
+ public Object visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command) throws Throwable
+ {
+ return visitPutKeyValueCommand(ctx, command);
+ }
+
+ @Override
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand
command) throws Throwable
{
Object returnValue = super.visitPutKeyValueCommand(ctx, command);
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java 2008-05-19
13:03:46 UTC (rev 5874)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java 2008-05-19
14:08:07 UTC (rev 5875)
@@ -14,6 +14,7 @@
import org.jboss.cache.commands.tx.RollbackCommand;
import org.jboss.cache.commands.write.MoveCommand;
import org.jboss.cache.commands.write.PutDataMapCommand;
+import org.jboss.cache.commands.write.PutForExternalReadCommand;
import org.jboss.cache.commands.write.PutKeyValueCommand;
import org.jboss.cache.commands.write.RemoveDataCommand;
import org.jboss.cache.commands.write.RemoveKeyCommand;
@@ -107,6 +108,12 @@
}
@Override
+ public Object visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command) throws Throwable
+ {
+ return visitPutKeyValueCommand(ctx, command);
+ }
+
+ @Override
public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws
Throwable
{
if (command.getFqn() != null)
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java 2008-05-19
13:03:46 UTC (rev 5874)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java 2008-05-19
14:08:07 UTC (rev 5875)
@@ -26,6 +26,7 @@
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.write.EvictCommand;
import org.jboss.cache.commands.write.PutDataMapCommand;
+import org.jboss.cache.commands.write.PutForExternalReadCommand;
import org.jboss.cache.commands.write.PutKeyValueCommand;
import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.interceptors.base.CommandInterceptor;
@@ -104,6 +105,12 @@
@Override
+ public Object visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command) throws Throwable
+ {
+ return visitPutKeyValueCommand(ctx, command);
+ }
+
+ @Override
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand
command) throws Throwable
{
long t1 = System.currentTimeMillis();
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java 2008-05-19
13:03:46 UTC (rev 5874)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java 2008-05-19
14:08:07 UTC (rev 5875)
@@ -1,7 +1,11 @@
package org.jboss.cache.interceptors;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.*;
+import org.jboss.cache.DataContainerImpl;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.InvocationContext;
+import org.jboss.cache.Modification;
+import org.jboss.cache.NodeSPI;
import org.jboss.cache.commands.AbstractVisitor;
import org.jboss.cache.commands.ReversibleCommand;
import org.jboss.cache.commands.VisitableCommand;
@@ -9,7 +13,13 @@
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
import org.jboss.cache.commands.tx.PrepareCommand;
import org.jboss.cache.commands.tx.RollbackCommand;
-import org.jboss.cache.commands.write.*;
+import org.jboss.cache.commands.write.MoveCommand;
+import org.jboss.cache.commands.write.PutDataMapCommand;
+import org.jboss.cache.commands.write.PutForExternalReadCommand;
+import org.jboss.cache.commands.write.PutKeyValueCommand;
+import org.jboss.cache.commands.write.RemoveDataCommand;
+import org.jboss.cache.commands.write.RemoveKeyCommand;
+import org.jboss.cache.commands.write.RemoveNodeCommand;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.factories.annotations.Start;
@@ -21,7 +31,12 @@
import javax.transaction.SystemException;
import javax.transaction.TransactionManager;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
@@ -83,7 +98,7 @@
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws
Throwable
+ protected Object handleCommitCommand(InvocationContext ctx, CommitCommand command)
throws Throwable
{
if (inTransaction())
{
@@ -131,7 +146,7 @@
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command)
throws Throwable
+ protected Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command)
throws Throwable
{
if (inTransaction())
{
@@ -156,13 +171,13 @@
}
@Override
- public Object handleOptimisticPrepareCommand(InvocationContext ctx,
OptimisticPrepareCommand command) throws Throwable
+ protected Object handleOptimisticPrepareCommand(InvocationContext ctx,
OptimisticPrepareCommand command) throws Throwable
{
return handlePrepareCommand(ctx, command);
}
@Override
- public Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command)
throws Throwable
+ protected Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command)
throws Throwable
{
if (inTransaction())
{
@@ -177,7 +192,7 @@
* access an element just removed, causing the CacheLoader to *load* the element
before *removing* it.
*/
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand
command) throws Throwable
+ protected Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand
command) throws Throwable
{
if (!inTransaction())
{
@@ -187,7 +202,7 @@
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command)
throws Throwable
+ protected Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand
command) throws Throwable
{
if (!inTransaction())
{
@@ -199,7 +214,7 @@
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand
command) throws Throwable
+ protected Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand
command) throws Throwable
{
if (!inTransaction())
{
@@ -215,7 +230,7 @@
}
@Override
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws
Throwable
+ protected Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws
Throwable
{
Object returnValue = invokeNextInterceptor(ctx, command);
if (inTransaction())
@@ -229,7 +244,7 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand
command) throws Throwable
+ protected Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand
command) throws Throwable
{
Object returnValue = invokeNextInterceptor(ctx, command);
if (inTransaction())
@@ -254,7 +269,7 @@
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand
command) throws Throwable
+ protected Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand
command) throws Throwable
{
Object returnValue = invokeNextInterceptor(ctx, command);
if (inTransaction())
@@ -267,6 +282,11 @@
return returnValue;
}
+ @Override
+ protected Object handlePutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command) throws Throwable
+ {
+ return handlePutKeyValueCommand(ctx, command);
+ }
private boolean inTransaction() throws SystemException
{
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java 2008-05-19
13:03:46 UTC (rev 5874)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/CallInterceptor.java 2008-05-19
14:08:07 UTC (rev 5875)
@@ -10,6 +10,7 @@
import org.jboss.cache.commands.tx.RollbackCommand;
import org.jboss.cache.commands.write.MoveCommand;
import org.jboss.cache.commands.write.PutDataMapCommand;
+import org.jboss.cache.commands.write.PutForExternalReadCommand;
import org.jboss.cache.commands.write.PutKeyValueCommand;
import org.jboss.cache.commands.write.RemoveDataCommand;
import org.jboss.cache.commands.write.RemoveKeyCommand;
@@ -119,6 +120,12 @@
}
@Override
+ public Object visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command) throws Throwable
+ {
+ return handleAlterCacheMethod(ctx, command);
+ }
+
+ @Override
public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command)
throws Throwable
{
return handleAlterCacheMethod(ctx, command);
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java 2008-05-19
13:03:46 UTC (rev 5874)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java 2008-05-19
14:08:07 UTC (rev 5875)
@@ -8,12 +8,17 @@
package org.jboss.cache.interceptors;
import org.jboss.cache.DataContainerImpl;
-import org.jboss.cache.*;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.InvocationContext;
+import org.jboss.cache.NodeSPI;
+import org.jboss.cache.Region;
+import org.jboss.cache.RegionManager;
import org.jboss.cache.commands.read.GetDataMapCommand;
import org.jboss.cache.commands.read.GetKeyValueCommand;
import org.jboss.cache.commands.read.GetNodeCommand;
import org.jboss.cache.commands.write.EvictCommand;
import org.jboss.cache.commands.write.PutDataMapCommand;
+import org.jboss.cache.commands.write.PutForExternalReadCommand;
import org.jboss.cache.commands.write.PutKeyValueCommand;
import org.jboss.cache.commands.write.RemoveDataCommand;
import org.jboss.cache.commands.write.RemoveKeyCommand;
@@ -76,6 +81,12 @@
}
@Override
+ public Object visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command) throws Throwable
+ {
+ return visitPutKeyValueCommand(ctx, command);
+ }
+
+ @Override
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand
command) throws Throwable
{
Object retVal = invokeNextInterceptor(ctx, command);
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/InvocationContextInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/InvocationContextInterceptor.java 2008-05-19
13:03:46 UTC (rev 5874)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/InvocationContextInterceptor.java 2008-05-19
14:08:07 UTC (rev 5875)
@@ -14,6 +14,7 @@
import org.jboss.cache.commands.tx.PrepareCommand;
import org.jboss.cache.commands.tx.RollbackCommand;
import org.jboss.cache.commands.write.PutDataMapCommand;
+import org.jboss.cache.commands.write.PutForExternalReadCommand;
import org.jboss.cache.commands.write.PutKeyValueCommand;
import org.jboss.cache.commands.write.RemoveDataCommand;
import org.jboss.cache.commands.write.RemoveKeyCommand;
@@ -48,6 +49,12 @@
}
@Override
+ public Object visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command) throws Throwable
+ {
+ return handleAll(ctx, command, command.getGlobalTransaction(), false);
+ }
+
+ @Override
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand
command) throws Throwable
{
return handleAll(ctx, command, command.getGlobalTransaction(), false);
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java 2008-05-19
13:03:46 UTC (rev 5874)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java 2008-05-19
14:08:07 UTC (rev 5875)
@@ -8,6 +8,7 @@
import org.jboss.cache.commands.read.GetKeysCommand;
import org.jboss.cache.commands.read.GetNodeCommand;
import org.jboss.cache.commands.write.PutDataMapCommand;
+import org.jboss.cache.commands.write.PutForExternalReadCommand;
import org.jboss.cache.commands.write.PutKeyValueCommand;
import org.jboss.cache.commands.write.RemoveDataCommand;
import org.jboss.cache.commands.write.RemoveKeyCommand;
@@ -64,6 +65,12 @@
}
@Override
+ public Object visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command) throws Throwable
+ {
+ return visitPutKeyValueCommand(ctx, command);
+ }
+
+ @Override
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand
command) throws Throwable
{
Set<MarshalledValue> marshalledValues = new
HashSet<MarshalledValue>();
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java 2008-05-19
13:03:46 UTC (rev 5874)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java 2008-05-19
14:08:07 UTC (rev 5875)
@@ -6,10 +6,16 @@
*/
package org.jboss.cache.interceptors;
+import org.jboss.cache.CacheException;
+import org.jboss.cache.CacheSPI;
import org.jboss.cache.DataContainerImpl;
-import org.jboss.cache.*;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.InvocationContext;
+import org.jboss.cache.NodeFactory;
+import org.jboss.cache.NodeSPI;
import org.jboss.cache.commands.write.MoveCommand;
import org.jboss.cache.commands.write.PutDataMapCommand;
+import org.jboss.cache.commands.write.PutForExternalReadCommand;
import org.jboss.cache.commands.write.PutKeyValueCommand;
import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.factories.annotations.Start;
@@ -68,6 +74,13 @@
}
@Override
+ public Object visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command) throws Throwable
+ {
+ createNode(ctx, command.getFqn(), false);
+ return invokeNextInterceptor(ctx, command);
+ }
+
+ @Override
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand
command) throws Throwable
{
createNode(ctx, command.getFqn(), false);
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java 2008-05-19
13:03:46 UTC (rev 5874)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java 2008-05-19
14:08:07 UTC (rev 5875)
@@ -7,8 +7,13 @@
package org.jboss.cache.interceptors;
import org.apache.commons.logging.LogFactory;
+import org.jboss.cache.CacheException;
import org.jboss.cache.DataContainerImpl;
-import org.jboss.cache.*;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.InvocationContext;
+import org.jboss.cache.NodeFactory;
+import org.jboss.cache.NodeNotExistsException;
+import org.jboss.cache.NodeSPI;
import org.jboss.cache.commands.ReversibleCommand;
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
import org.jboss.cache.commands.read.GetDataMapCommand;
@@ -17,6 +22,7 @@
import org.jboss.cache.commands.read.GetNodeCommand;
import org.jboss.cache.commands.write.MoveCommand;
import org.jboss.cache.commands.write.PutDataMapCommand;
+import org.jboss.cache.commands.write.PutForExternalReadCommand;
import org.jboss.cache.commands.write.PutKeyValueCommand;
import org.jboss.cache.commands.write.RemoveDataCommand;
import org.jboss.cache.commands.write.RemoveKeyCommand;
@@ -89,6 +95,12 @@
}
@Override
+ public Object visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command) throws Throwable
+ {
+ return visitPutKeyValueCommand(ctx, command);
+ }
+
+ @Override
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand
command) throws Throwable
{
TransactionWorkspace workspace = getTransactionWorkspace(ctx);
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-05-19
13:03:46 UTC (rev 5874)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-05-19
14:08:07 UTC (rev 5875)
@@ -79,19 +79,19 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand
command) throws Throwable
+ protected Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand
command) throws Throwable
{
return handlePutCommand(ctx, command, false);
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand
command) throws Throwable
+ protected Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand
command) throws Throwable
{
return handlePutCommand(ctx, command, false);
}
@Override
- public Object handlePutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command) throws Throwable
+ protected Object handlePutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command) throws Throwable
{
return handlePutCommand(ctx, command, true);
}
@@ -123,7 +123,7 @@
}
@Override
- public Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command)
throws Throwable
+ protected Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command)
throws Throwable
{
// 2-phase commit prepares are no-ops here.
if (!command.isOnePhaseCommit()) return invokeNextInterceptor(ctx, command);
@@ -136,7 +136,7 @@
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws
Throwable
+ protected Object handleCommitCommand(InvocationContext ctx, CommitCommand command)
throws Throwable
{
commit(ctx.getTransactionEntry(), command.getGlobalTransaction());
if (trace) log.trace("bypassed locking as method commit() doesn't require
locking");
@@ -146,7 +146,7 @@
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command)
throws Throwable
+ protected Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command)
throws Throwable
{
TransactionEntry entry = ctx.getTransactionEntry();
if (trace)
@@ -176,7 +176,7 @@
}
@Override
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws
Throwable
+ protected Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws
Throwable
{
if (ctx.isLockingSuppressed()) return invokeNextInterceptor(ctx, command);
long timeout = ctx.getContextLockAcquisitionTimeout(lockAcquisitionTimeout);
@@ -209,7 +209,7 @@
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand
command) throws Throwable
+ protected Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand
command) throws Throwable
{
if (ctx.isLockingSuppressed()) return invokeNextInterceptor(ctx, command);
// need to make a note of ALL nodes created here!!
@@ -258,49 +258,49 @@
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command)
throws Throwable
+ protected Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand
command) throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.WRITE,
false, false, false, false, null, false);
return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand
command) throws Throwable
+ protected Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand
command) throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.WRITE,
false, false, false, false, null, false);
return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand command)
throws Throwable
+ protected Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand command)
throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.WRITE,
false, true, false, false, null, false);
return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand
command) throws Throwable
+ protected Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand
command) throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.READ,
false, false, false, false, null, false);
return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command)
throws Throwable
+ protected Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command)
throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.READ,
false, false, false, false, null, false);
return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command)
throws Throwable
+ protected Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command)
throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.READ,
false, false, false, false, null, false);
return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handleGetChildrenNamesCommand(InvocationContext ctx,
GetChildrenNamesCommand command) throws Throwable
+ protected Object handleGetChildrenNamesCommand(InvocationContext ctx,
GetChildrenNamesCommand command) throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.READ,
false, false, false, false, null, false);
return invokeNextInterceptor(ctx, command);
Modified:
core/trunk/src/test/java/org/jboss/cache/api/pfer/PutForExternalReadTestBase.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/api/pfer/PutForExternalReadTestBase.java 2008-05-19
13:03:46 UTC (rev 5874)
+++
core/trunk/src/test/java/org/jboss/cache/api/pfer/PutForExternalReadTestBase.java 2008-05-19
14:08:07 UTC (rev 5875)
@@ -305,7 +305,7 @@
asyncWait();
assertEquals("PFER updated cache2", value, cache2.get(fqn, key));
- assertEquals("PFER propagated to cache1 as expected", value,
cache1.get(fqn, key));
+ assertEquals("Cache1 should be unaffected", value, cache1.get(fqn,
key));
}
/**