Package org.jboss.cache

Examples of org.jboss.cache.Node.addChild()


   public void testLazyLoadingOnNodeAddChild() throws Exception
   {
      Fqn newChild = Fqn.fromString("/newchild");
      cache.getTransactionManager().begin();
      Node node = cache.getRoot().getChild(parent);
      node.addChild(newChild);
      assert node.hasChild(newChild) : "Node should have added child";
      WorkspaceNode n = getWorkspaceNode(parent);
      assert !n.isChildrenLoaded() : "Should not have loaded children";
      cache.getTransactionManager().commit();
   }
View Full Code Here


   {
      Fqn fqn = Fqn.fromString("/test/node");
     
      Node root = cache1.getRoot();
      cache1.getInvocationContext().getOptionOverrides().setDataVersion(new NonLockingDataVersion());
      root.addChild(fqn);
      cache1.getInvocationContext().getOptionOverrides().setDataVersion(new NonLockingDataVersion());
      cache1.removeNode(fqn);
     
      Assert.assertNull(cache1.getRoot().getChild(fqn));
   }
View Full Code Here

   public void testNodeAPI()
   {
      Node root = cache.getRoot();
      try
      {
         root.addChild(parent);
         fail("addChild on destroyed cache did not throw ISE");
      }
      catch (IllegalStateException good)
      {
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.