Interface SpeedManagerAlgorithmProvider
-
- All Known Implementing Classes:
SpeedManagerAlgorithmProviderDHTPing
,SpeedManagerAlgorithmProviderPingMap
,SpeedManagerAlgorithmProviderV1
,SpeedManagerAlgorithmProviderV2
,SpeedManagerImpl.nullProvider
public interface SpeedManagerAlgorithmProvider
-
-
Field Summary
Fields Modifier and Type Field Description static int
UPDATE_PERIOD_MILLIS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
calculate(SpeedManagerPingSource[] sources)
Called whenever a new set of ping values is available for processingvoid
destroy()
boolean
getAdjustsDownloadLimits()
Indicates whether or not the provider is adjusting download as well as upload limitsint
getCurrentChokeSpeed()
Returns the current view of when choking occursint
getCurrentPingMillis()
int
getIdlePingMillis()
Various getters for interesting info shown in stats viewint
getMaxPingMillis()
int
getMaxUploadSpeed()
void
pingSourceFailed(SpeedManagerPingSource source)
Ping source has failedvoid
pingSourceFound(SpeedManagerPingSource source, boolean is_replacement)
Called when a new source of ping times has been foundvoid
reset()
Reset any state to start of day valuesvoid
updateStats()
Called periodically (see period above) to allow stats to be updated.
-
-
-
Field Detail
-
UPDATE_PERIOD_MILLIS
static final int UPDATE_PERIOD_MILLIS
- See Also:
- Constant Field Values
-
-
Method Detail
-
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()
-
-