public PeerNode closerPeer(PeerNode pn, Set<PeerNode> routedTo, double loc, boolean ignoreSelf, boolean calculateMisrouting, int minVersion, List<Double> addUnpickedLocsTo, Key key, short outgoingHTL, long ignoreBackoffUnder, boolean isLocal, boolean realTime, boolean excludeMandatoryBackoff) { return closerPeer(pn, routedTo, loc, ignoreSelf, calculateMisrouting, minVersion, addUnpickedLocsTo, 2.0, key, outgoingHTL, ignoreBackoffUnder, isLocal, realTime, null, false, System.currentTimeMillis(), excludeMandatoryBackoff); }
public long checkRecentlyFailed(Key key, boolean realTime) { RecentlyFailedReturn r = new RecentlyFailedReturn(); // We always decrement when we start a request. This feeds into the // routing decision. Depending on our decrementAtMax flag, it may or // may not actually go down one hop. But if we don't use it here then // this won't be comparable to the decisions taken by the RequestSender, // so we will keep on selecting and RF'ing locally, and wasting send // slots and CPU. FIXME SECURITY/NETWORK: Reconsider if we ever decide // not to decrement on the originator. short origHTL = node.decrementHTL(null, node.maxHTL()); node.peers.closerPeer(null, new HashSet<PeerNode>(), key.toNormalizedDouble(), true, false, -1, null, 2.0, key, origHTL, 0, true, realTime, r, false, System.currentTimeMillis(), node.enableNewLoadManagement(realTime)); return r.recentlyFailed(); }
private PeerNode closerPeer(HashSet<PeerNode> exclude, long now, boolean newLoadManagement) { return node.peers.closerPeer(sourceForRouting(), exclude, target, true, node.isAdvancedModeEnabled(), -1, null, 2.0, isInsert() ? null : key, htl, ignoreLowBackoff(), source == null, realTimeFlag, null, false, now, newLoadManagement); }
PeerNode first = closerPeer(pn, routedTo, target, ignoreSelf, false, minVersion, null, maxDistance, key, outgoingHTL, ignoreBackoffUnder, isLocal, realTime, null, true, now, newLoadManagement); if(first != null) { long firstTime; HashSet<PeerNode> newRoutedTo = new HashSet<PeerNode>(routedTo); newRoutedTo.add(first); PeerNode second = closerPeer(pn, newRoutedTo, target, ignoreSelf, false, minVersion, null, maxDistance, key, outgoingHTL, ignoreBackoffUnder, isLocal, realTime, null, true, now, newLoadManagement); if(second != null) { if((secondTime = entry.getTimeoutTime(first, outgoingHTL, now, false)) > now) {
next = node.peers.closerPeer(source, nodesRoutedTo, target, true, node.isAdvancedModeEnabled(), -1, null, 2.0, key, htl, 0, source == null, realTimeFlag, r, false, now, newLoadManagement);
next = node.peers.closerPeer(forkedRequestTag == null ? source : null, nodesRoutedTo, target, true, node.isAdvancedModeEnabled(), -1, null, null, htl, ignoreLowBackoff ? Node.LOW_BACKOFF : 0, source == null, realTimeFlag, newLoadManagement);
next = node.peers.closerPeer(forkedRequestTag == null ? source : null, nodesRoutedTo, target, true, node.isAdvancedModeEnabled(), -1, null, null, htl, ignoreLowBackoff ? Node.LOW_BACKOFF : 0, source == null, realTimeFlag, newLoadManagement);
next = node.peers.closerPeer(pn, ctx.routedTo, target, true, node.isAdvancedModeEnabled(), -1, null, null, htl, 0, pn == null, false, false); if(logMINOR) Logger.minor(this, "Next: "+next+" message: "+m);
next = node.peers.closerPeer(source, nodesRoutedTo, target, true, node.isAdvancedModeEnabled(), -1, null, null, htl, 0, source == null, false, false); } else {