Class DownloadingUnchoker

java.lang.Object
com.biglybt.core.peermanager.unchoker.DownloadingUnchoker
All Implemented Interfaces:
Unchoker

public class DownloadingUnchoker extends Object implements Unchoker
Unchoker implementation to be used while in downloading mode.
  • Field Details

  • Constructor Details

    • DownloadingUnchoker

      protected DownloadingUnchoker()
  • Method Details

    • isSeedingUnchoker

      public boolean isSeedingUnchoker()
      Specified by:
      isSeedingUnchoker in interface Unchoker
    • getImmediateUnchokes

      public ArrayList<PEPeer> getImmediateUnchokes(int max_to_unchoke, ArrayList<PEPeer> all_peers)
      Description copied from interface: Unchoker
      Get any unchokes that should be performed immediately.
      Specified by:
      getImmediateUnchokes in interface Unchoker
      Parameters:
      max_to_unchoke - maximum number of peers allowed to be unchoked
      all_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: Unchoker
      Perform peer choke, unchoke and optimistic calculations
      Specified by:
      calculateUnchokes in interface Unchoker
      Parameters:
      max_to_unchoke - maximum number of peers allowed to be unchoked
      all_peers - list of peers to choose from
      force_refresh - force a refresh of optimistic unchokes
    • getChokes

      public ArrayList<PEPeer> getChokes()
      Description copied from interface: Unchoker
      Get the list of peers calculated to be choked.
      Specified by:
      getChokes in interface Unchoker
      Returns:
      peers to choke
    • getUnchokes

      public ArrayList<PEPeer> getUnchokes()
      Description copied from interface: Unchoker
      Get the list of peers calculated to be unchoked.
      Specified by:
      getUnchokes in interface Unchoker
      Returns:
      peers to unchoke