@Override public boolean handle( Pair<Long, ChildAssociationRef> childAssocPair, Pair<Long, NodeRef> parentNodePair, Pair<Long, NodeRef> childNodePair) { VisitedNode visitedNode = nodesVisitedById.get(childNodePair.getFirst()); if (visitedNode == null) { throw new IllegalStateException("Querying upwards found nodes not visited: " + childNodePair); } if (childAssocPair.getSecond().isPrimary()) { // Double check the primary association if (!visitedNode.primaryParentAssocPair.equals(childAssocPair)) { // The primary parent association for the node has changed throw new ConcurrencyFailureException("Node parent changed while hierarchy was being examined: " + childNodePair); } } else { // Record all secondary parent associations visitedNode.secondaryParentAssocs.add(childAssocPair); } // More results return true; } @Override
@Override public boolean handle( Pair<Long, ChildAssociationRef> childAssocPair, Pair<Long, NodeRef> parentNodePair, Pair<Long, NodeRef> childNodePair) { VisitedNode visitedNode = nodesVisitedById.get(childNodePair.getFirst()); if (visitedNode == null) { throw new IllegalStateException("Querying upwards found nodes not visited: " + childNodePair); } if (childAssocPair.getSecond().isPrimary()) { // Double check the primary association if (!visitedNode.primaryParentAssocPair.equals(childAssocPair)) { // The primary parent association for the node has changed throw new ConcurrencyFailureException("Node parent changed while hierarchy was being examined: " + childNodePair); } } else { // Record all secondary parent associations visitedNode.secondaryParentAssocs.add(childAssocPair); } // More results return true; } @Override
if (isActive && !(existingNamespacePair.equals(newNamespacePair)))
if (isActive && !(existingNamespacePair.equals(newNamespacePair)))
final int expectedTotal = source.length + results.size(); if (boundsError && !new Pair<Integer, Integer>(null, null).equals(actualResults.getTotalResultCount()))