Author: manik.surtani(a)jboss.com
Date: 2008-12-09 13:03:13 -0500 (Tue, 09 Dec 2008)
New Revision: 7270
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/MVCCLockingInterceptor.java
Log:
JBCACHE-1450 - putForExternalRead() doesn't use a 0 lock acquisition timeout with
MVCC
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/MVCCLockingInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/MVCCLockingInterceptor.java 2008-12-09
15:04:25 UTC (rev 7269)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/MVCCLockingInterceptor.java 2008-12-09
18:03:13 UTC (rev 7270)
@@ -81,7 +81,10 @@
@Override
protected boolean doBeforeCall(InvocationContext ctx, VisitableCommand command)
{
- if (ctx.getOptionOverrides().isSuppressLocking() && log.isWarnEnabled())
log.warn("Lock suppression not supported with MVCC!");
+ if (ctx.getOptionOverrides().isSuppressLocking() && log.isWarnEnabled())
+ {
+ log.warn("Lock suppression not supported with MVCC!");
+ }
return true;
}
@@ -102,6 +105,7 @@
@Override
public Object handlePutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command) throws Throwable
{
+ ctx.getOptionOverrides().setLockAcquisitionTimeout(0);
helper.wrapNodeForWriting(ctx, command.getFqn(), true, true, false, false, false);
// get the node and stick it in the context.
return invokeNextInterceptor(ctx, command);
}
@@ -150,7 +154,9 @@
fqnsToEvict = new LinkedList<Fqn>();
// lock recursively.
for (InternalNode child : children.values())
+ {
fqnsToEvict.addAll(helper.wrapNodesRecursivelyForRemoval(ctx,
child.getFqn()));
+ }
}
else
{
@@ -177,7 +183,9 @@
if (!children.isEmpty())
{
for (InternalNode child : children.values())
+ {
helper.wrapNodeForWriting(ctx, child.getFqn(), true, false, false, true,
true);
+ }
}
}
else
Show replies by date