public void addPeerDiscovery ( PeerDiscovery peerDiscovery ) { lock . lock ( ) ; try { if ( getMaxConnections ( ) == 0 ) setMaxConnections ( DEFAULT_CONNECTIONS ) ; peerDiscoverers . add ( peerDiscovery ) ; } finally { lock . unlock ( ) ; } }
Add addresses from a discovery source to the list of potential peers to connect to . If max connections has not been configured or set to zero then it s set to the default at this point .