[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Galder Zamarreno
galder.zamarreno at jboss.com
Fri Jun 29 09:33:38 EDT 2007
User: gzamarreno
Date: 07/06/29 09:33:38
Modified: src/org/jboss/cache/interceptors Tag:
Branch_JBossCache_1_4_0 CacheLoaderInterceptor.java
Log:
[JBCACHE-1103] Finished the backport from head.
Revision Changes Path
No revision
No revision
1.40.2.8 +8 -3 JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheLoaderInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java,v
retrieving revision 1.40.2.7
retrieving revision 1.40.2.8
diff -u -b -r1.40.2.7 -r1.40.2.8
--- CacheLoaderInterceptor.java 24 Jun 2007 21:17:25 -0000 1.40.2.7
+++ CacheLoaderInterceptor.java 29 Jun 2007 13:33:37 -0000 1.40.2.8
@@ -29,7 +29,7 @@
* Loads nodes that don't exist at the time of the call into memory from the CacheLoader
*
* @author Bela Ban
- * @version $Id: CacheLoaderInterceptor.java,v 1.40.2.7 2007/06/24 21:17:25 jawilson Exp $
+ * @version $Id: CacheLoaderInterceptor.java,v 1.40.2.8 2007/06/29 13:33:37 gzamarreno Exp $
*/
public class CacheLoaderInterceptor extends Interceptor implements CacheLoaderInterceptorMBean
{
@@ -173,9 +173,9 @@
if (mustLoad(n, key))
{
if (initNode)
+ {
n = createTempNode(fqn, entry);
- else if (!wasRemovedInTx(fqn))
- n = loadNode(fqn, n, entry);
+ }
// Only attempt to acquire this lock if we need to - i.e., if
// the lock hasn't already been acquired by the Lock
// interceptor. CRUD methods (put, remove) would have acquired
@@ -190,6 +190,11 @@
// - Manik Surtani (21 March 2006)
if (acquireLock)
lock(fqn, DataNode.LOCK_TYPE_WRITE, false); // not recursive
+
+ if (!initNode && !wasRemovedInTx(fqn))
+ {
+ n = loadNode(fqn, n, entry);
+ }
}
// The complete list of children aren't known without loading them
More information about the jboss-cvs-commits
mailing list