[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Manik Surtani
msurtani at jboss.com
Thu Aug 10 12:28:21 EDT 2006
User: msurtani
Date: 06/08/10 12:28:21
Modified: src/org/jboss/cache/interceptors
CacheLoaderInterceptor.java
Log:
Habanero stabilisation efforts
Revision Changes Path
1.42 +39 -26 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.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- CacheLoaderInterceptor.java 19 Jul 2006 21:34:43 -0000 1.41
+++ CacheLoaderInterceptor.java 10 Aug 2006 16:28:21 -0000 1.42
@@ -16,11 +16,12 @@
import java.util.ListIterator;
import java.util.Map;
import java.util.Set;
+import java.util.Collection;
/**
* 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.41 2006/07/19 21:34:43 msurtani Exp $
+ * @version $Id: CacheLoaderInterceptor.java,v 1.42 2006/08/10 16:28:21 msurtani Exp $
*/
public class CacheLoaderInterceptor extends BaseCacheLoaderInterceptor implements CacheLoaderInterceptorMBean
{
@@ -348,6 +349,7 @@
return n;
}
+
private DataNode createNodes(Fqn fqn, TransactionEntry entry) throws Exception
{
Fqn tmp_fqn = Fqn.ROOT;
@@ -360,7 +362,9 @@
{
Object child_name = fqn.get(i);
tmp_fqn = new Fqn(tmp_fqn, child_name);
- Node child_node = n.getChild(new Fqn(child_name));
+
+// Node child_node = n.getChild(new Fqn(child_name));
+ Node child_node = findChild(n.getChildren(), child_name);
boolean last = (i == size - 1);
if (child_node == null)
@@ -389,6 +393,15 @@
return (DataNode) n;
}
+ private Node findChild(Collection<Node> children, Object child_name)
+ {
+ for (Node n : children)
+ {
+ if (n.getFqn().getLast().equals(child_name)) return n;
+ }
+ return null;
+ }
+
private void cleanupNodesCreated(TransactionEntry entry)
{
boolean traceEnabled = log.isTraceEnabled();
More information about the jboss-cvs-commits
mailing list