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
PeerDiscovery
getPeers
in interface PeerDiscovery
PeerDiscoveryException
protected ExecutorService createExecutor()
public void shutdown()
PeerDiscovery
shutdown
in interface PeerDiscovery
Copyright © 2016. All rights reserved.