[jbosscache-commits] JBoss Cache SVN: r5957 - demos/core-demo-gui/trunk/src/main/java/org/jboss/cache/demo.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Thu Jun 5 06:07:17 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-06-05 06:07:17 -0400 (Thu, 05 Jun 2008)
New Revision: 5957

Modified:
   demos/core-demo-gui/trunk/src/main/java/org/jboss/cache/demo/JBossCacheDemo.java
Log:
Removed use of internal APIs

Modified: demos/core-demo-gui/trunk/src/main/java/org/jboss/cache/demo/JBossCacheDemo.java
===================================================================
--- demos/core-demo-gui/trunk/src/main/java/org/jboss/cache/demo/JBossCacheDemo.java	2008-06-04 18:11:48 UTC (rev 5956)
+++ demos/core-demo-gui/trunk/src/main/java/org/jboss/cache/demo/JBossCacheDemo.java	2008-06-05 10:07:17 UTC (rev 5957)
@@ -9,7 +9,6 @@
 import org.jboss.cache.DefaultCacheFactory;
 import org.jboss.cache.Fqn;
 import org.jboss.cache.Node;
-import org.jboss.cache.NodeSPI;
 import org.jboss.cache.notifications.annotation.BuddyGroupChanged;
 import org.jboss.cache.notifications.annotation.NodeCreated;
 import org.jboss.cache.notifications.annotation.NodeModified;
@@ -636,26 +635,23 @@
             {
                public void run()
                {
-
                   // get all kids and add to the tree as well.
-                  CacheSPI<String, String> spi = (CacheSPI) cache;
-                  recursivelyAddNode(spi.peek(fqn, false));
+                  recursivelyAddNode(cache.getNode(fqn));
                   // only refresh if there are no more tasks queued up
                   if (asyncTaskQueue.isEmpty()) treeRefresher.repaint();
                }
 
-               private void recursivelyAddNode(NodeSPI<String, String> n)
+               private void recursivelyAddNode(Node<String, String> n)
                {
                   treeRefresher.addNode(n.getFqn());
-                  for (Node<String, String> child : n.getChildrenDirect())
-                     recursivelyAddNode((NodeSPI<String, String>) child);
+                  for (Node<String, String> child : n.getChildren())
+                     recursivelyAddNode(child);
                }
 
             });
          }
       }
 
-
       @NodeRemoved
       public void nodeRemoved(NodeRemovedEvent e)
       {




More information about the jbosscache-commits mailing list