public class FutureRouting extends BaseFutureImpl<FutureRouting>
#setNeighbors(SortedSet, SortedSet, SortedSet, boolean, boolean)
BaseFuture.FutureType
completed, lock, reason, type
Constructor and Description |
---|
FutureRouting() |
Modifier and Type | Method and Description |
---|---|
NavigableSet<PeerAddress> |
getDirectHits()
The direct hits set contains those peers that reported to have the key
(Number160) we were looking for.
|
SortedMap<PeerAddress,DigestInfo> |
getDirectHitsDigest()
The direct hits map contains those peers that reported to have the key
(Number160) we were looking for including its digest (size of the result
set and its xored hashes).
|
String |
getFailedReason()
The default failed reason is Unknown.
|
NavigableSet<PeerAddress> |
getPotentialHits()
The potential hits set contains those peers that are in the direct hit
and that did report to *not* have the key (Number160) we were looking
for.
|
SortedSet<PeerAddress> |
getRoutingPath()
Returns the peers that have been asked to provide neighbor information.
|
void |
setNeighbors(SortedMap<PeerAddress,DigestInfo> directHits,
NavigableSet<PeerAddress> potentialHits,
SortedSet<PeerAddress> routingPath,
boolean isBootstrap,
boolean isRoutingToOther)
Sets the result of the routing process and finishes the future.
|
addCancellation, addListener, addListener, await, await, awaitListeners, awaitUninterruptibly, awaitUninterruptibly, cancel, getType, isCompleted, isFailed, isSuccess, notifyListerenrs, removeListener, self, setCompletedAndNotify, setFailed, setFailed, setFailed, setFailed, setFailed
public void setNeighbors(SortedMap<PeerAddress,DigestInfo> directHits, NavigableSet<PeerAddress> potentialHits, SortedSet<PeerAddress> routingPath, boolean isBootstrap, boolean isRoutingToOther)
directHits
- The direct hits, the peers in the direct set that reports to
have the key (Number160) we were looking for.potentialHits
- The potential hits, the peers in the direct set and those
peers that reports to *not* have the key (Number160) we were
looking for.routingPath
- A set of peers that took part in the routing process.isBootstrap
- Whether the future was triggered by the bootstrap process or
the a P2P processisRoutingToOther
- Whether routing peers have been specified others than myself.getDirectHits()
,
getDirectHitsDigest()
,
getPotentialHits()
,
getRoutingPath()
public NavigableSet<PeerAddress> getPotentialHits()
getDirectHits()
,
getDirectHitsDigest()
public NavigableSet<PeerAddress> getDirectHits()
getPotentialHits()
,
getDirectHitsDigest()
public SortedMap<PeerAddress,DigestInfo> getDirectHitsDigest()
getPotentialHits()
,
getDirectHits()
public SortedSet<PeerAddress> getRoutingPath()
public String getFailedReason()
BaseFuture
getFailedReason
in interface BaseFuture
getFailedReason
in class BaseFutureImpl<FutureRouting>
Copyright © 2013. All Rights Reserved.