public abstract class ScheduledPeerSource extends Object implements PeerSource
Constructor and Description |
---|
ScheduledPeerSource(ExecutorService executor,
Duration trackerTimeout) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
collectPeers(Consumer<Peer> peerConsumer) |
Collection<Peer> |
getPeers()
Get the list of peers.
|
boolean |
update()
Ask to update the list of peers (usually from an external source).
|
public ScheduledPeerSource(ExecutorService executor, Duration trackerTimeout)
public Collection<Peer> getPeers()
PeerSource
PeerSource.update()
has been called for the first time.getPeers
in interface PeerSource
public boolean update()
PeerSource
update
in interface PeerSource
Copyright © 2016–2021. All rights reserved.