[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Manik Surtani
manik at jboss.org
Fri Apr 20 09:02:48 EDT 2007
User: msurtani
Date: 07/04/20 09:02:48
Modified: src/org/jboss/cache/interceptors Tag:
Branch_JBossCache_1_4_0
InvalidationInterceptor.java
Log:
JBCACHE-1027
Revision Changes Path
No revision
No revision
1.19.2.2 +54 -32 JBossCache/src/org/jboss/cache/interceptors/InvalidationInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: InvalidationInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/InvalidationInterceptor.java,v
retrieving revision 1.19.2.1
retrieving revision 1.19.2.2
diff -u -b -r1.19.2.1 -r1.19.2.2
--- InvalidationInterceptor.java 28 Feb 2007 18:37:01 -0000 1.19.2.1
+++ InvalidationInterceptor.java 20 Apr 2007 13:02:48 -0000 1.19.2.2
@@ -65,6 +65,8 @@
// now see if this is a CRUD method:
if (MethodDeclarations.isCrudMethod(meth))
{
+ if (m.getMethodId() != MethodDeclarations.putFailFastKeyValueMethodLocal_id)
+ {
if (log.isDebugEnabled()) log.debug("Is a CRUD method");
Fqn fqn = findFqn( m.getArgs() );
if (fqn != null)
@@ -80,6 +82,11 @@
}
else
{
+ log.debug("Encountered a putFailFast() - is a no op.");
+ }
+ }
+ else
+ {
// not a CRUD method - lets see if it is a tx lifecycle method.
if (tx != null && isValid(tx))
{
@@ -97,6 +104,12 @@
if (modifications.size() > 0)
{
+ if (containsPutFailFast(modifications))
+ {
+ log.debug("Modification list contains a putFailFast operation. Not invalidating.");
+ }
+ else
+ {
try
{
invalidateModifications(modifications, cache.isNodeLockingOptimistic() ? getWorkspace(gtx) : null);
@@ -118,7 +131,11 @@
throw new RuntimeException("Unable to broadcast invalidation messages", t);
}
}
- log.debug("Leaving InvalidationInterceptor's prepare phase");
+ }
+ else
+ {
+ log.debug("Nothing to invalidate - no modifications in the transaction.");
+ }
break;
}
}
@@ -127,6 +144,11 @@
return retval;
}
+ private boolean containsPutFailFast(List l)
+ {
+ for (Iterator i = l.iterator(); i.hasNext();) if (((JBCMethodCall) i.next()).getMethodId() == MethodDeclarations.putFailFastKeyValueMethodLocal_id) return true;
+ return false;
+ }
public long getInvalidations()
{
return m_invalidations;
More information about the jboss-cvs-commits
mailing list