| | |
| | | if (recursive) { |
| | | // The root cannot be queued directly. |
| | | // We need to queue each child individually. |
| | | Enumeration e = rootNode.children(); |
| | | Enumeration<?> e = rootNode.children(); |
| | | while (e.hasMoreElements()) { |
| | | BasicNode child = (BasicNode)e.nextElement(); |
| | | startRefreshNode(child, null, true); |
| | |
| | | refreshQueue.queue(new NodeRefresher(node, this, localEntry, recursive)); |
| | | // The task does not *see* suffixes. |
| | | // So we need to propagate the refresh on |
| | | // the subsuffixes if any. |
| | | // the sub-suffixes if any. |
| | | if (recursive && (node instanceof SuffixNode)) { |
| | | Enumeration e = node.children(); |
| | | Enumeration<?> e = node.children(); |
| | | while (e.hasMoreElements()) { |
| | | BasicNode child = (BasicNode)e.nextElement(); |
| | | if (child instanceof SuffixNode) { |
| | |
| | | refreshQueue.cancelAll(); |
| | | } |
| | | else { |
| | | Enumeration e = node.children(); |
| | | Enumeration<?> e = node.children(); |
| | | while (e.hasMoreElements()) { |
| | | BasicNode child = (BasicNode)e.nextElement(); |
| | | stopRefreshNode(child); |
| | |
| | | * @param parentNode the parent node. |
| | | */ |
| | | void startRefreshReferralNodes(BasicNode parentNode) { |
| | | Enumeration e = parentNode.children(); |
| | | Enumeration<?> e = parentNode.children(); |
| | | while (e.hasMoreElements()) { |
| | | BasicNode child = (BasicNode)e.nextElement(); |
| | | if ((child.getReferral() != null) || (child.getRemoteUrl() != null)) { |
| | |
| | | if (!(node instanceof RootNode)) { |
| | | BasicNode basicNode = (BasicNode)node; |
| | | stopRefreshNode(basicNode); |
| | | synchronized (refreshQueue) |
| | | { |
| | | boolean isWorking = refreshQueue.isWorking(basicNode); |
| | | refreshQueue.cancelForNode(basicNode); |
| | | if (isWorking) |
| | | { |
| | | basicNode.setRefreshNeededOnExpansion(true); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | (newState == NodeRefresher.State.SEARCHING_CHILDREN)) { |
| | | // The children search is going to start |
| | | if (canDoDifferentialUpdate(task)) { |
| | | Enumeration e = node.children(); |
| | | Enumeration<?> e = node.children(); |
| | | while (e.hasMoreElements()) { |
| | | BasicNode child = (BasicNode)e.nextElement(); |
| | | child.setObsolete(true); |