class FloodfillPeerSelector extends PeerSelector
_context, _log
コンストラクタ | 説明 |
---|---|
FloodfillPeerSelector(RouterContext ctx) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
(package private) java.util.List<Hash> |
selectFloodfillParticipants(Hash key,
int howMany,
java.util.Set<Hash> toIgnore,
KBucketSet<Hash> kbuckets) |
See above for description
List will not include our own hash
|
(package private) java.util.List<Hash> |
selectFloodfillParticipants(Hash key,
int maxNumRouters,
KBucketSet<Hash> kbuckets) |
Sort the floodfills.
|
(package private) java.util.List<Hash> |
selectFloodfillParticipants(KBucketSet<Hash> kbuckets) |
|
(package private) java.util.List<Hash> |
selectMostReliablePeers(Hash key,
int maxNumRouters,
java.util.Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets) |
Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia.
|
(package private) java.util.List<Hash> |
selectNearest(Hash key,
int maxNumRouters,
java.util.Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets) |
Floodfill peers only.
|
(package private) java.util.List<Hash> |
selectNearestExplicitThin(Hash key,
int maxNumRouters,
java.util.Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets) |
Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia.
|
(package private) java.util.List<Hash> |
selectNearestExplicitThin(Hash key,
int maxNumRouters,
java.util.Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets,
boolean preferConnected) |
Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
selectNearestExplicit
public FloodfillPeerSelector(RouterContext ctx)
java.util.List<Hash> selectMostReliablePeers(Hash key, int maxNumRouters, java.util.Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets)
selectMostReliablePeers
クラス内 PeerSelector
key
- the ROUTING key (NOT the original key)peersToIgnore
- can be nulljava.util.List<Hash> selectNearestExplicitThin(Hash key, int maxNumRouters, java.util.Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets)
selectNearestExplicitThin
クラス内 PeerSelector
key
- the ROUTING key (NOT the original key)peersToIgnore
- can be nulljava.util.List<Hash> selectNearestExplicitThin(Hash key, int maxNumRouters, java.util.Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets, boolean preferConnected)
key
- the ROUTING key (NOT the original key)peersToIgnore
- can be nulljava.util.List<Hash> selectFloodfillParticipants(KBucketSet<Hash> kbuckets)
kbuckets
- now unusedjava.util.List<Hash> selectFloodfillParticipants(Hash key, int maxNumRouters, KBucketSet<Hash> kbuckets)
key
- the ROUTING key (NOT the original key)maxNumRouters
- max to returnkbuckets
- now unused
Sorted by closest to the key if > maxNumRouters, otherwise not
The list is in 3 groups - sorted by routing key within each group.
Group 1: No store or lookup failure in a long time, and
lookup fail rate no more than 1.5 * average
Group 2: No store or lookup failure in a little while or
success newer than failure
Group 3: All othersjava.util.List<Hash> selectFloodfillParticipants(Hash key, int howMany, java.util.Set<Hash> toIgnore, KBucketSet<Hash> kbuckets)
key
- the ROUTING key (NOT the original key)toIgnore
- can be nullkbuckets
- now unusedjava.util.List<Hash> selectNearest(Hash key, int maxNumRouters, java.util.Set<Hash> peersToIgnore, KBucketSet<Hash> kbuckets)
selectNearest
クラス内 PeerSelector
key
- the original key (NOT the routing key)peersToIgnore
- can be null