Interface SpeedManagerAlgorithmProvider
- All Known Implementing Classes:
SpeedManagerAlgorithmProviderDHTPing, SpeedManagerAlgorithmProviderPingMap, SpeedManagerAlgorithmProviderV1, SpeedManagerAlgorithmProviderV2, SpeedManagerImpl.nullProvider
public interface SpeedManagerAlgorithmProvider
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidcalculate(SpeedManagerPingSource[] sources) Called whenever a new set of ping values is available for processingvoiddestroy()booleanIndicates whether or not the provider is adjusting download as well as upload limitslongReturns the current view of when choking occursintintVarious getters for interesting info shown in stats viewintlongvoidPing source has failedvoidpingSourceFound(SpeedManagerPingSource source, boolean is_replacement) Called when a new source of ping times has been foundvoidreset()Reset any state to start of day valuesvoidCalled periodically (see period above) to allow stats to be updated.
-
Field Details
-
UPDATE_PERIOD_MILLIS
static final int UPDATE_PERIOD_MILLIS- See Also:
-
-
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
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
-
calculate
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
long getCurrentChokeSpeed()Returns the current view of when choking occurs- Returns:
- speed in bytes/sec
-
getMaxUploadSpeed
long getMaxUploadSpeed() -
getAdjustsDownloadLimits
boolean getAdjustsDownloadLimits()Indicates whether or not the provider is adjusting download as well as upload limits- Returns:
-
destroy
void destroy()
-