Package org.johnnei.javatorrent.tracker
Class UncappedDistributor
- java.lang.Object
-
- org.johnnei.javatorrent.tracker.UncappedDistributor
-
- All Implemented Interfaces:
IPeerDistributor
public class UncappedDistributor extends Object implements IPeerDistributor
An implementation ofIPeerDistributorwhich does not cap the amount of peers.
-
-
Constructor Summary
Constructors Constructor Description UncappedDistributor()Creates an instance ofUncappedDistributorUncappedDistributor(TorrentClient tc)Creates an instance ofUncappedDistributorwhich allows forUncappedDistributor::newto be used inTorrentClient.Builder.setPeerDistributor(Function)
-
-
-
Constructor Detail
-
UncappedDistributor
public UncappedDistributor()
Creates an instance ofUncappedDistributor
-
UncappedDistributor
public UncappedDistributor(TorrentClient tc)
Creates an instance ofUncappedDistributorwhich allows forUncappedDistributor::newto be used inTorrentClient.Builder.setPeerDistributor(Function)- Parameters:
tc- The torrent client instance.
-
-
Method Detail
-
hasReachedPeerLimit
public boolean hasReachedPeerLimit(Torrent torrent)
- Specified by:
hasReachedPeerLimitin interfaceIPeerDistributor- Parameters:
torrent- The torrent to calculate the limit for.- Returns:
truewhen the torrent has reached the calculated peer count limit.
-
-