Interface Unchoker
- All Known Implementing Classes:
DownloadingUnchoker
,SeedingUnchoker
public interface Unchoker
Performs peer choke/unchoke calculations.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
calculateUnchokes
(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
-
Method Details
-
isSeedingUnchoker
boolean isSeedingUnchoker() -
getImmediateUnchokes
Get any unchokes that should be performed immediately.- Parameters:
max_to_unchoke
- maximum number of peers allowed to be unchokedall_peers
- list of peers to choose from- Returns:
- peers to unchoke
-
calculateUnchokes
void calculateUnchokes(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 calculations- 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
Get the list of peers calculated to be choked.- Returns:
- peers to choke
-
getUnchokes
Get the list of peers calculated to be unchoked.- Returns:
- peers to unchoke
-