Package org.jboss.cache

Examples of org.jboss.cache.NodeNotExistsException


         // if not, get it from the data container.  No need to wrap here, we're just going to update the parent's child map.
         retval = container.peekInternalNode(parentFqn, false);
      }
      if (retval == null)
      {
         throw new NodeNotExistsException("Node " + parentFqn + " cannot be found in any context or data container!");
      }
      return retval;
   }
View Full Code Here


         // node does not exist; return an empty list since there is nothing to remove!
         return Collections.emptyList();
      } else {
         // update child ref on parent to point to child as this is now a copy.
         if (parentLockNeeded && (needToCopyNode || needToCopyParent)) {
            if (parent == null) throw new NodeNotExistsException("Parent node " + parentFqn + " does not exist!");
            InternalNode ref = null;
            if (configuration.getIsolationLevel() == IsolationLevel.READ_COMMITTED)
            {
               ref = new NodeReference(node.getDelegationTarget());
            }
View Full Code Here

         // node does not exist; return an empty list since there is nothing to remove!
         return Collections.emptyList();
      } else {
         // update child ref on parent to point to child as this is now a copy.
         if (parentLockNeeded && (needToCopyNode || needToCopyParent)) {
            if (parent == null) throw new NodeNotExistsException("Parent node " + parentFqn + " does not exist!");
            InternalNode ref = null;
            if (configuration.getIsolationLevel() == IsolationLevel.READ_COMMITTED)
            {
               ref = new NodeReference(node.getDelegationTarget());
            }
View Full Code Here

         log.warn("Attempting to move the root node.  Not taking any action, treating this as a no-op.");
         return;
      }

      WorkspaceNode oldParent = fetchWorkspaceNode(ctx, nodeFqn.getParent(), ws, false, true);
      if (oldParent == null) throw new NodeNotExistsException("Node " + nodeFqn.getParent() + " does not exist!");

      if (parentFqn.equals(oldParent.getFqn()))
      {
         log.warn("Attempting to move a node in same place.  Not taking any action, treating this as a no-op.");
         return;
      }
      // retrieve parent
      WorkspaceNode parent = fetchWorkspaceNode(ctx, parentFqn, ws, false, true);
      if (parent == null) throw new NodeNotExistsException("Node " + parentFqn + " does not exist!");

      Object nodeName = nodeFqn.getLastElement();

      // now that we have the parent and target nodes:
      // first correct the pointers at the pruning point
View Full Code Here

   }

   private void putDataMapAndNotify(Map<Object, Object> data, TransactionWorkspace workspace, WorkspaceNode workspaceNode, InvocationContext ctx)
   {
      if (workspaceNode == null)
         throw new NodeNotExistsException("optimisticCreateIfNotExistsInterceptor should have created this node!");
      // pre-notify
      notifier.notifyNodeModified(workspaceNode.getFqn(), true, PUT_MAP, workspaceNode.getData(), ctx);
      workspaceNode.putAll(data);
      workspace.addNode(workspaceNode);
      // post-notify
View Full Code Here

   }

   private Object putDataKeyValueAndNotify(Object key, Object value, TransactionWorkspace workspace, WorkspaceNode workspaceNode, InvocationContext ctx)
   {
      if (workspaceNode == null)
         throw new NodeNotExistsException("optimisticCreateIfNotExistsInterceptor should have created this node!");

      if (notifier.shouldNotifyOnNodeModified())// pre-notify
      {
         notifier.notifyNodeModified(workspaceNode.getFqn(), true, PUT_DATA, workspaceNode.getData(), ctx);
      }
View Full Code Here

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

      Fqn parentFqn = workspaceNode.getFqn().getParent();
      WorkspaceNode parentNode = fetchWorkspaceNode(ctx, parentFqn, workspace, false, true);
      if (parentNode == null) throw new NodeNotExistsException("Unable to find parent node with fqn " + parentFqn);

      // pre-notify
      if (notify) notifier.notifyNodeRemoved(workspaceNode.getFqn(), true, workspaceNode.getData(), ctx);

      Fqn nodeFqn = workspaceNode.getFqn();
View Full Code Here

         // node does not exist; return an empty list since there is nothing to remove!
         return Collections.emptyList();
      } else {
         // update child ref on parent to point to child as this is now a copy.
         if (parentLockNeeded && (needToCopyNode || needToCopyParent)) {
            if (parent == null) throw new NodeNotExistsException("Parent node " + parentFqn + " does not exist!");
            InternalNode ref = null;
            if (configuration.getIsolationLevel() == IsolationLevel.READ_COMMITTED)
            {
               ref = new NodeReference(node.getDelegationTarget());
            }
View Full Code Here

         // if not, get it from the data container.  No need to wrap here, we're just going to update the parent's child map.
         retval = container.peekInternalNode(parentFqn, false);
      }
      if (retval == null)
      {
         throw new NodeNotExistsException("Node " + parentFqn + " cannot be found in any context or data container!");
      }
      return retval;
   }
View Full Code Here

      {
         log.trace("perform(" + globalTransaction + ", \"" + fqn + "\", " + data + ")");
      }
//      NodeSPI nodeSPI = dataContainer.peekStrict(globalTransaction, fqn, false);
      NodeSPI nodeSPI = ctx.lookUpNode(fqn);
      if (nodeSPI == null) throw new NodeNotExistsException("Node " + fqn + " does not exist!");
      Map existingData = nodeSPI.getDataDirect();

      if (notifier.shouldNotifyOnNodeModified())
      {
         notifier.notifyNodeModified(fqn, true, NodeModifiedEvent.ModificationType.PUT_MAP, existingData == null ? Collections.emptyMap() : existingData, ctx);
View Full Code Here

TOP

Related Classes of org.jboss.cache.NodeNotExistsException

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.