Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.i2p.router.peermanager
Class PeerManager

    java.lang.Object
      net.i2p.router.peermanager.PeerManager

     class PeerManager

extends 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.

Constructor Summary
`PeerManager(RouterContext context)`

Method Summary
`List<Hash>` | `getPeersByCapability(char capability)` The only user of this is TunnelPeerSelector for unreachables?
`(package private) void` | `loadProfiles()`
`void` | `removeCapabilities(Hash peer)`
`(package private) Set` | `selectPeers()`
`(package private) List<Hash>` | `selectPeers(PeerSelectionCriteria criteria)` Find some peers that meet the criteria and we have the netDb info for locally Only used by PeerTestJob (PURPOSE_TEST)
`void` | `setCapabilities(Hash peer, String caps)`
`(package private) void` | `storeProfile(Hash peer)`
`(package private) void` | `storeProfiles()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PeerManager

    public PeerManager(RouterContext context)

Method Detail

### storeProfiles

    void storeProfiles()

### selectPeers

    Set selectPeers()

### storeProfile

    void storeProfile(Hash peer)

### loadProfiles

    void loadProfiles()

### selectPeers

    List<Hash> selectPeers(PeerSelectionCriteria criteria)

  Find some peers that meet the criteria and we have the netDb info for locally Only used by PeerTestJob (PURPOSE_TEST)

### setCapabilities

    public void setCapabilities(Hash peer,
                                String caps)

### removeCapabilities

    public void removeCapabilities(Hash peer)

### getPeersByCapability

    public List<Hash> getPeersByCapability(char capability)

  The only user of this is TunnelPeerSelector for unreachables?

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD