[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Manik Surtani
msurtani at jboss.com
Thu Dec 14 07:51:48 EST 2006
User: msurtani
Date: 06/12/14 07:51:48
Modified: src/org/jboss/cache/interceptors Tag:
Branch_JBossCache_1_4_0
PessimisticLockInterceptor.java
Log:
Updated the way nodes are marked for removal (API stuff)
Revision Changes Path
No revision
No revision
1.20.2.8 +3 -4 JBossCache/src/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PessimisticLockInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/PessimisticLockInterceptor.java,v
retrieving revision 1.20.2.7
retrieving revision 1.20.2.8
diff -u -b -r1.20.2.7 -r1.20.2.8
--- PessimisticLockInterceptor.java 13 Dec 2006 16:01:47 -0000 1.20.2.7
+++ PessimisticLockInterceptor.java 14 Dec 2006 12:51:48 -0000 1.20.2.8
@@ -10,7 +10,6 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.GlobalTransaction;
import org.jboss.cache.InvocationContext;
-import org.jboss.cache.Node;
import org.jboss.cache.TransactionEntry;
import org.jboss.cache.TransactionTable;
import org.jboss.cache.TreeCache;
@@ -37,7 +36,7 @@
* current method and unlock when the method returns.
*
* @author Bela Ban
- * @version $Id: PessimisticLockInterceptor.java,v 1.20.2.7 2006/12/13 16:01:47 msurtani Exp $
+ * @version $Id: PessimisticLockInterceptor.java,v 1.20.2.8 2006/12/14 12:51:48 msurtani Exp $
*/
public class PessimisticLockInterceptor extends Interceptor
{
@@ -314,12 +313,12 @@
private boolean needToReverseRemove(DataNode n, TransactionEntry te, int lockTypeRequested, boolean isRemoveOperation, boolean createIfNotExists)
{
- return !isRemoveOperation && createIfNotExists && lockTypeRequested == DataNode.LOCK_TYPE_WRITE && cache.isMarkedForRemoval(n) && te.getRemovedNodes().contains(n.getFqn());
+ return !isRemoveOperation && createIfNotExists && lockTypeRequested == DataNode.LOCK_TYPE_WRITE && n.isMarkedForRemoval() && te.getRemovedNodes().contains(n.getFqn());
}
private void reverseRemove(DataNode n)
{
- cache.scrubRemoveMarker((Node) n, false);
+ n.unmarkForRemoval(false);
}
private boolean writeLockNeeded(int lock_type, int currentNodeIndex, int treeNodeSize, boolean isRemoveOperation, boolean createIfNotExists, Fqn targetFqn, Fqn currentFqn)
More information about the jboss-cvs-commits
mailing list