Package net.i2p.router.peermanager
Class PeerManagerFacadeImpl
- java.lang.Object
-
- net.i2p.router.peermanager.PeerManagerFacadeImpl
-
- All Implemented Interfaces:
PeerManagerFacade,Service
public class PeerManagerFacadeImpl extends Object implements PeerManagerFacade
Base implementation that has simple algorithms and periodically saves state
-
-
Constructor Summary
Constructors Constructor Description PeerManagerFacadeImpl(RouterContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intcountPeersByCapability(char capability)Set<Hash>getPeersByCapability(char capability)voidremoveCapabilities(Hash peer)voidrenderStatusHTML(Writer out)Deprecated.moved to routerconsolevoidrestart()Perform a soft restart.HashselectRandomByCapability(char capability)Deprecated.unusedvoidsetCapabilities(Hash peer, String caps)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.
-
-
-
Constructor Detail
-
PeerManagerFacadeImpl
public PeerManagerFacadeImpl(RouterContext ctx)
-
-
Method Detail
-
startup
public void startup()
Description copied from interface:ServiceInstruct the service that it should start normal operation. This call DOES block until the service is ready.
-
shutdown
public void shutdown()
Description copied from interface:ServiceInstruct the service that the router is shutting down and that it should do whatever is necessary to go down gracefully. It should not depend on other components at this point. This call DOES block.
-
restart
public void restart()
Description copied from interface:ServicePerform a soft restart.
-
setCapabilities
public void setCapabilities(Hash peer, String caps)
- Specified by:
setCapabilitiesin interfacePeerManagerFacade- Parameters:
caps- non-null
-
removeCapabilities
public void removeCapabilities(Hash peer)
- Specified by:
removeCapabilitiesin interfacePeerManagerFacade
-
selectRandomByCapability
@Deprecated public Hash selectRandomByCapability(char capability)
Deprecated.unused- Specified by:
selectRandomByCapabilityin interfacePeerManagerFacade
-
getPeersByCapability
public Set<Hash> getPeersByCapability(char capability)
- Specified by:
getPeersByCapabilityin interfacePeerManagerFacade- Parameters:
capability- case-insensitive- Returns:
- non-null unmodifiable set
-
countPeersByCapability
public int countPeersByCapability(char capability)
- Specified by:
countPeersByCapabilityin interfacePeerManagerFacade- Parameters:
capability- case-insensitive- Returns:
- how many
- Since:
- 0.9.45
-
renderStatusHTML
@Deprecated public void renderStatusHTML(Writer out) throws IOException
Deprecated.moved to routerconsole- Specified by:
renderStatusHTMLin interfaceService- Throws:
IOException
-
-