net.i2p.router.peermanager
Class PeerManager
java.lang.Object
net.i2p.router.peermanager.PeerManager
class PeerManager
- extends java.lang.Object
Manage the current state of the statistics
All the capabilities methods appear to be almost unused -
TunnelPeerSelector just looks for unreachables, and that's it?
If so, a lot of this can go away, including the array of 26 ArrayLists,
and a lot of synchronization on _capabilitiesByPeer.
We don't trust any published capabilities except for 'K' and 'U'.
This should be cleaned up.
setCapabilities() and removeCapabilities() can just add/remove the profile and that's it.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PeerManager
public PeerManager(RouterContext context)
storeProfiles
void storeProfiles()
selectPeers
java.util.Set selectPeers()
storeProfile
void storeProfile(Hash peer)
loadProfiles
void loadProfiles()
selectPeers
java.util.List selectPeers(PeerSelectionCriteria criteria)
- Find some peers that meet the criteria and we have the netDb info for locally
setCapabilities
public void setCapabilities(Hash peer,
java.lang.String caps)
removeCapabilities
public void removeCapabilities(Hash peer)
selectRandomByCapability
public Hash selectRandomByCapability(char capability)
getPeersByCapability
public java.util.List getPeersByCapability(char capability)