[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Elias Ross
genman at noderunner.net
Fri Nov 24 21:38:51 EST 2006
User: genman
Date: 06/11/24 21:38:51
Modified: src/org/jboss/cache/interceptors
CacheLoaderInterceptor.java
Log:
JBCACHE-867 fix regression in CacheLoaderInterceptor
Revision Changes Path
1.62 +19 -24 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.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- CacheLoaderInterceptor.java 23 Nov 2006 19:43:05 -0000 1.61
+++ CacheLoaderInterceptor.java 25 Nov 2006 02:38:51 -0000 1.62
@@ -33,7 +33,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.61 2006/11/23 19:43:05 genman Exp $
+ * @version $Id: CacheLoaderInterceptor.java,v 1.62 2006/11/25 02:38:51 genman Exp $
*/
public class CacheLoaderInterceptor extends BaseCacheLoaderInterceptor implements CacheLoaderInterceptorMBean
{
@@ -291,16 +291,16 @@
// create child if it didn't exist
cache.getInvocationContext().getOptionOverrides().setBypassInterceptorChain(true);
- node.addChild(child_fqn);
- Node child = node.getNodeSPI().getChildrenMap().get(name);
+ Node child = node.addChild(child_fqn);
+ Map childMap = child.getNodeSPI().getRawData();
if (isActivation && recursive)
{
// load data for children as well!
- node.getNodeSPI().getRawData().putAll(loader.get(child.getFqn()));
+ childMap.putAll(loader.get(child.getFqn()));
}
else
{
- node.getNodeSPI().getRawData().put(TreeCache.UNINITIALIZED, null);
+ childMap.put(TreeCache.UNINITIALIZED, null);
}
if (recursive)
{
@@ -313,26 +313,21 @@
private boolean mustLoad(Node n, Object key)
{
- boolean mustLoad = n == null || (n.getKeys().contains(TreeCache.UNINITIALIZED) && (key == null || !n.getKeys().contains(key)));
- if (log.isTraceEnabled())
- {
- String reason = null;
- if (n == null)
- {
- reason = "node is null";
- }
- else if (n.getKeys().contains(TreeCache.UNINITIALIZED))
- {
- reason = "node is uninitialised";
+ if (n == null) {
+ log.trace("mustLoad, node null");
+ return true;
}
- else if (key == null || !n.getKeys().contains(key))
- {
- reason = "key not in node";
+ if (n.getKeys().contains(TreeCache.UNINITIALIZED)) {
+ log.trace("must Load, uninitialized");
+ return true;
}
- log.trace("mustLoad reason: " + reason);
+ /*
+ if (!n.getKeys().contains(key)) {
+ log.trace("must Load, no key");
+ return true;
}
-
- return mustLoad;
+ */
+ return false;
}
public long getCacheLoaderLoads()
More information about the jboss-cvs-commits
mailing list