public class MultiplexingDiscovery extends Object implements PeerDiscovery
| Modifier and Type | Field and Description |
|---|---|
protected NetworkParameters |
netParams |
protected List<PeerDiscovery> |
seeds |
| Constructor and Description |
|---|
MultiplexingDiscovery(NetworkParameters params,
List<PeerDiscovery> seeds)
Will query the given seeds in parallel before producing a merged response.
|
| Modifier and Type | Method and Description |
|---|---|
protected ExecutorService |
createExecutor() |
InetSocketAddress[] |
getPeers(long timeoutValue,
TimeUnit timeoutUnit)
Returns an array of addresses.
|
void |
shutdown()
Stops any discovery in progress when we want to shut down quickly.
|
protected final List<PeerDiscovery> seeds
protected final NetworkParameters netParams
public MultiplexingDiscovery(NetworkParameters params, List<PeerDiscovery> seeds)
public InetSocketAddress[] getPeers(long timeoutValue, TimeUnit timeoutUnit) throws PeerDiscoveryException
PeerDiscoverygetPeers in interface PeerDiscoveryPeerDiscoveryExceptionprotected ExecutorService createExecutor()
public void shutdown()
PeerDiscoveryshutdown in interface PeerDiscoveryCopyright © 2015. All rights reserved.