Examples of SharedSet


Examples of org.modeshape.jcr.JcrSharedNodeCache.SharedSet

        // is actually underneath the source node by walking up the destination path to see if there are any
        // shared nodes (including the shareable node) below the source path ...
        AbstractJcrNode destAncestor = destParentNode;
        while (!destAncestor.isRoot()) {
            if (destAncestor.isShareable()) {
                SharedSet sharedSet = destAncestor.sharedSet();
                AbstractJcrNode sharedNodeThatCreatesCircularity = sharedSet.getSharedNodeAtOrBelow(srcPath);
                if (sharedNodeThatCreatesCircularity != null) {
                    Path badPath = sharedNodeThatCreatesCircularity.path();
                    throw new RepositoryException(JcrI18n.unableToMoveNodeDueToCycle.text(srcAbsPath, destAbsPath,
                                                                                          readable(badPath)));
                }
View Full Code Here

Examples of org.modeshape.jcr.JcrSharedNodeCache.SharedSet

    @Override
    public void removeSharedSet() throws VersionException, LockException, ConstraintViolationException, RepositoryException {
        if (isShareable()) {
            // Remove all of the node is the shared set ...
            SharedSet sharedSet = sharedSet();
            if (sharedSet.getSize() != 1) {
                // There's more than one shared
                NodeIterator sharedSetNodes = sharedSet.getSharedNodes();
                List<AbstractJcrNode> shared = new ArrayList<AbstractJcrNode>();
                while (sharedSetNodes.hasNext()) {
                    AbstractJcrNode nodeInSharedSet = (AbstractJcrNode)sharedSetNodes.nextNode();

                    // Check whether the parent is locked or if the session has permissions ...
View Full Code Here

Examples of org.modeshape.jcr.JcrSharedNodeCache.SharedSet

            return;
        }

        // It is shareable, so we need to check how many shares there are before we remove this node from its parent ...
        JcrSharedNodeCache shareableNodeCache = session().shareableNodeCache();
        SharedSet sharedSet = shareableNodeCache.getSharedSet(this);
        if (sharedSet.getSize() <= 1) {
            // There are no shares, so destroy the node and the shared set ...
            parent.removeChild(cache, key);
            cache.destroy(key);
            shareableNodeCache.destroyed(key);
            return;
View Full Code Here

Examples of org.vertx.java.core.shareddata.impl.SharedSet

   */
  public <E> Set<E> getSet(String name) {
    SharedSet<E> set = (SharedSet<E>) sets.get(name);
    if (set == null) {
      set = new SharedSet<>();
      SharedSet prev = sets.putIfAbsent(name, set);
      if (prev != null) {
        set = prev;
      }
    }
    return set;
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.