Package org.jboss.cache

Examples of org.jboss.cache.TreeNode


      // it is already removed - we can ignore it
      if (workspaceNode == null)
         return;

      // get the parent
      TreeNode temp = workspaceNode.getParent();

      // can parent be null?
      if (temp == null)
         return;

      boolean debug = log.isDebugEnabled();

      Fqn parentFqn = temp.getFqn();

      // get a wrapped parent
      WorkspaceNode parentNode = getOrCreateWorkspaceNode(parentFqn, workspace, false);
      if (parentNode == null)
      {
View Full Code Here


   {
      return CachedType.hasAnnotation(clazz, advisor, type);
   }

   private void createNode(Fqn fqn, GlobalTransaction tx) {
      TreeNode n, child_node;
      Object child_name;
      Fqn tmp_fqn=Fqn.ROOT;

      if(fqn == null) return;
         int treeNodeSize=fqn.size();
         n=cache_.getRoot();
         for(int i=0; i < treeNodeSize; i++) {
            child_name=fqn.get(i);
            tmp_fqn=new Fqn(tmp_fqn, child_name);
            child_node=n.getChild(child_name);
            if(child_node == null) {
               child_node=n.createChild(child_name, tmp_fqn, n);
               if(tx != null) {
                  MethodCall undo_op=MethodCallFactory.create(MethodDeclarations.removeNodeMethodLocal,
                                                    new Object[]{tx, tmp_fqn, Boolean.FALSE});
                  cache_.addUndoOperation(tx, undo_op);
               }
View Full Code Here

                 List deltas = wrappedNode.getMergedChildren();

                 if (trace) log.trace("Applying children deltas to parent node " + current.getFqn());
                 for (Iterator i = ((Set) deltas.get(0)).iterator(); i.hasNext();)
                 {
                     TreeNode child = (TreeNode) i.next();
                     current.addChild(child.getName(), child);
                 }

                 for (Iterator i = ((Set) deltas.get(1)).iterator(); i.hasNext();)
                 {
                    TreeNode child = (TreeNode) i.next();
                    current.removeChild(child.getName());
                 }

                  updateVersion = cache.getLockParentForChildInsertRemove();
              }
View Full Code Here

      // it is already removed - we can ignore it
      if (workspaceNode == null)
         return;

      // get the parent
      TreeNode temp = workspaceNode.getParent();

      // can parent be null?
      if (temp == null)
         return;

      boolean debug = log.isDebugEnabled();

      Fqn parentFqn = temp.getFqn();

      // get a wrapped parent
      WorkspaceNode parentNode = getOrCreateWorkspaceNode(parentFqn, workspace, false);
      if (parentNode == null)
      {
View Full Code Here

    */
   protected DataNode getNode(Fqn fqn)
   {
      int treeNodeSize = fqn.size();

      TreeNode n = cache.getRoot();
      TreeNode child_node;
      Object child_name;
      for (int i = 0; i < treeNodeSize && n != null; i++)
      {
         child_name = fqn.get(i);
         child_node = n.getChild(child_name);
View Full Code Here

   {
      Fqn tmp_fqn = Fqn.ROOT;

      int size = fqn.size();

      TreeNode n = cache.getRoot();
      for (int i = 0; i < size; i++)
      {
         Object child_name = fqn.get(i);
         tmp_fqn = new Fqn(tmp_fqn, child_name);
         TreeNode child_node = n.getChild(child_name);
         boolean last = (i == size - 1);

         if (child_node == null)
         {
            if (last)
View Full Code Here

   {
      return CachedType.hasAnnotation(clazz, advisor, type);
   }

   private void createNode(Fqn fqn, GlobalTransaction tx) {
      TreeNode n, child_node;
      Object child_name;
      Fqn tmp_fqn=Fqn.ROOT;

      if(fqn == null) return;
         int treeNodeSize=fqn.size();
         n=cache_.getRoot();
         for(int i=0; i < treeNodeSize; i++) {
            child_name=fqn.get(i);
            tmp_fqn=new Fqn(tmp_fqn, child_name);
            child_node=n.getChild(child_name);
            if(child_node == null) {
               child_node=n.createChild(child_name, tmp_fqn, n);
               if(tx != null) {
                  MethodCall undo_op=MethodCallFactory.create(MethodDeclarations.removeNodeMethodLocal,
                                                    new Object[]{tx, tmp_fqn, Boolean.FALSE});
                  cache_.addUndoOperation(tx, undo_op);
               }
View Full Code Here

      // it is already removed - we can ignore it
      if (workspaceNode == null)
         return;

      // get the parent
      TreeNode temp = workspaceNode.getParent();

      // can parent be null?
      if (temp == null)
         return;

      boolean debug = log.isDebugEnabled();

      Fqn parentFqn = temp.getFqn();

      // get a wrapped parent
      WorkspaceNode parentNode = getOrCreateWorkspaceNode(parentFqn, workspace, false);
      if (parentNode == null)
      {
View Full Code Here

TOP

Related Classes of org.jboss.cache.TreeNode

Copyright © 2018 www.massapicom. 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.