- All Superinterfaces:
Service
- All Known Implementing Classes:
DummyPeerManagerFacade, PeerManagerFacadeImpl
Manage peer references and keep them up to date so that when asked for peers, it can provide appropriate peers according to the criteria provided. This includes periodically queueing up outbound messages to the peers to test them.
Method Summary
All MethodsModifier and TypeMethodDescriptionintcountPeersByCapability(char capability) Count of peers with the given capability.getPeersByCapability(char capability) All peers with the given capability.The peer test job for testing peers.voidremoveCapabilities(Hash peer) Remove all capabilities from a peer.voidsetCapabilities(Hash peer, String caps) The capabilities for a peer.Methods inherited from interface Service
renderStatusHTML, restart, shutdown, startupModifier and TypeMethodDescriptionvoidrenderStatusHTML(Writer out) Render the status as HTML.voidrestart()Perform a soft restart.voidshutdown()Instruct the service that the router is shutting down and that it should do whatever is necessary to go down gracefully.voidstartup()Instruct the service that it should start normal operation.
Method Details
getPeersByCapability
countPeersByCapability
int countPeersByCapability(char capability) Count of peers with the given capability.- Parameters:
capability- the capability code to match, e.g.'f'for floodfill- Returns:
- the number of known peers advertising that capability
setCapabilities
removeCapabilities
Remove all capabilities from a peer.- Parameters:
peer- the router hash of the peer to clear capabilities from
getPeerTestJob