class FloodfillPeerSelector extends PeerSelector
_context, _log| Constructor and Description |
|---|
FloodfillPeerSelector(RouterContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
(package private) List<net.i2p.data.Hash> |
selectFloodfillParticipants(net.i2p.data.Hash key,
int maxNumRouters,
net.i2p.kademlia.KBucketSet<net.i2p.data.Hash> kbuckets)
Sort the floodfills.
|
(package private) List<net.i2p.data.Hash> |
selectFloodfillParticipants(net.i2p.data.Hash key,
int howMany,
Set<net.i2p.data.Hash> toIgnore,
net.i2p.kademlia.KBucketSet<net.i2p.data.Hash> kbuckets)
See above for description
List will not include our own hash
Returns new list, may be modified.
|
(package private) List<net.i2p.data.Hash> |
selectFloodfillParticipants(net.i2p.kademlia.KBucketSet<net.i2p.data.Hash> kbuckets)
List will not include our own hash.
|
(package private) List<net.i2p.data.Hash> |
selectMostReliablePeers(net.i2p.data.Hash key,
int maxNumRouters,
Set<net.i2p.data.Hash> peersToIgnore,
net.i2p.kademlia.KBucketSet<net.i2p.data.Hash> kbuckets)
Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia.
|
(package private) List<net.i2p.data.Hash> |
selectNearest(net.i2p.data.Hash key,
int maxNumRouters,
Set<net.i2p.data.Hash> peersToIgnore,
net.i2p.kademlia.KBucketSet<net.i2p.data.Hash> kbuckets)
Floodfill peers only.
|
(package private) List<net.i2p.data.Hash> |
selectNearestExplicitThin(net.i2p.data.Hash key,
int maxNumRouters,
Set<net.i2p.data.Hash> peersToIgnore,
net.i2p.kademlia.KBucketSet<net.i2p.data.Hash> kbuckets)
Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia.
|
(package private) List<net.i2p.data.Hash> |
selectNearestExplicitThin(net.i2p.data.Hash key,
int maxNumRouters,
Set<net.i2p.data.Hash> peersToIgnore,
net.i2p.kademlia.KBucketSet<net.i2p.data.Hash> kbuckets,
boolean preferConnected)
Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia.
|
selectNearestExplicitpublic FloodfillPeerSelector(RouterContext ctx)
List<net.i2p.data.Hash> selectMostReliablePeers(net.i2p.data.Hash key, int maxNumRouters, Set<net.i2p.data.Hash> peersToIgnore, net.i2p.kademlia.KBucketSet<net.i2p.data.Hash> kbuckets)
selectMostReliablePeers in class PeerSelectorkey - the ROUTING key (NOT the original key)peersToIgnore - can be nullList<net.i2p.data.Hash> selectNearestExplicitThin(net.i2p.data.Hash key, int maxNumRouters, Set<net.i2p.data.Hash> peersToIgnore, net.i2p.kademlia.KBucketSet<net.i2p.data.Hash> kbuckets)
selectNearestExplicitThin in class PeerSelectorkey - the ROUTING key (NOT the original key)peersToIgnore - can be nullList<net.i2p.data.Hash> selectNearestExplicitThin(net.i2p.data.Hash key, int maxNumRouters, Set<net.i2p.data.Hash> peersToIgnore, net.i2p.kademlia.KBucketSet<net.i2p.data.Hash> kbuckets, boolean preferConnected)
key - the ROUTING key (NOT the original key)peersToIgnore - can be nullList<net.i2p.data.Hash> selectFloodfillParticipants(net.i2p.kademlia.KBucketSet<net.i2p.data.Hash> kbuckets)
kbuckets - now unusedList<net.i2p.data.Hash> selectFloodfillParticipants(net.i2p.data.Hash key, int maxNumRouters, net.i2p.kademlia.KBucketSet<net.i2p.data.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 othersList<net.i2p.data.Hash> selectFloodfillParticipants(net.i2p.data.Hash key, int howMany, Set<net.i2p.data.Hash> toIgnore, net.i2p.kademlia.KBucketSet<net.i2p.data.Hash> kbuckets)
key - the ROUTING key (NOT the original key)toIgnore - can be nullkbuckets - now unusedList<net.i2p.data.Hash> selectNearest(net.i2p.data.Hash key, int maxNumRouters, Set<net.i2p.data.Hash> peersToIgnore, net.i2p.kademlia.KBucketSet<net.i2p.data.Hash> kbuckets)
selectNearest in class PeerSelectorkey - the original key (NOT the routing key)peersToIgnore - can be null