Interface SpeedManagerAlgorithmProvider

All Known Implementing Classes:
SpeedManagerAlgorithmProviderDHTPing, SpeedManagerAlgorithmProviderPingMap, SpeedManagerAlgorithmProviderV1, SpeedManagerAlgorithmProviderV2, SpeedManagerImpl.nullProvider

public interface SpeedManagerAlgorithmProvider
  • Field Details

  • Method Details

    • reset

      void reset()
      Reset any state to start of day values
    • updateStats

      void updateStats()
      Called periodically (see period above) to allow stats to be updated.
    • pingSourceFound

      void pingSourceFound(SpeedManagerPingSource source, boolean is_replacement)
      Called when a new source of ping times has been found
      Parameters:
      source -
      is_replacement - One of the initial sources or a replacement for a failed one
    • pingSourceFailed

      void pingSourceFailed(SpeedManagerPingSource source)
      Ping source has failed
      Parameters:
      source -
    • calculate

      void calculate(SpeedManagerPingSource[] sources)
      Called whenever a new set of ping values is available for processing
      Parameters:
      sources -
    • getIdlePingMillis

      int getIdlePingMillis()
      Various getters for interesting info shown in stats view
      Returns:
    • getCurrentPingMillis

      int getCurrentPingMillis()
    • getMaxPingMillis

      int getMaxPingMillis()
    • getCurrentChokeSpeed

      int getCurrentChokeSpeed()
      Returns the current view of when choking occurs
      Returns:
      speed in bytes/sec
    • getMaxUploadSpeed

      int getMaxUploadSpeed()
    • getAdjustsDownloadLimits

      boolean getAdjustsDownloadLimits()
      Indicates whether or not the provider is adjusting download as well as upload limits
      Returns:
    • destroy

      void destroy()