Class DownloadingUnchoker
java.lang.Object
com.biglybt.core.peermanager.unchoker.DownloadingUnchoker
- All Implemented Interfaces:
Unchoker
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcalculateUnchokes(int max_to_unchoke, ArrayList<PEPeer> all_peers, boolean force_refresh, boolean check_priority_connections, boolean do_high_latency_peers) Perform peer choke, unchoke and optimistic calculationsGet the list of peers calculated to be choked.getImmediateUnchokes(int max_to_unchoke, ArrayList<PEPeer> all_peers) Get any unchokes that should be performed immediately.Get the list of peers calculated to be unchoked.boolean
-
Field Details
-
chokes
-
unchokes
-
-
Constructor Details
-
DownloadingUnchoker
protected DownloadingUnchoker()
-
-
Method Details
-
isSeedingUnchoker
public boolean isSeedingUnchoker()- Specified by:
isSeedingUnchokerin interfaceUnchoker
-
getImmediateUnchokes
Description copied from interface:UnchokerGet any unchokes that should be performed immediately.- Specified by:
getImmediateUnchokesin interfaceUnchoker- Parameters:
max_to_unchoke- maximum number of peers allowed to be unchokedall_peers- list of peers to choose from- Returns:
- peers to unchoke
-
calculateUnchokes
public void calculateUnchokes(int max_to_unchoke, ArrayList<PEPeer> all_peers, boolean force_refresh, boolean check_priority_connections, boolean do_high_latency_peers) Description copied from interface:UnchokerPerform peer choke, unchoke and optimistic calculations- Specified by:
calculateUnchokesin interfaceUnchoker- Parameters:
max_to_unchoke- maximum number of peers allowed to be unchokedall_peers- list of peers to choose fromforce_refresh- force a refresh of optimistic unchokes
-
getChokes
-
getUnchokes
Description copied from interface:UnchokerGet the list of peers calculated to be unchoked.- Specified by:
getUnchokesin interfaceUnchoker- Returns:
- peers to unchoke
-