Interface SpeedManagerAlgorithmProvider
- All Known Implementing Classes:
SpeedManagerAlgorithmProviderDHTPing
,SpeedManagerAlgorithmProviderPingMap
,SpeedManagerAlgorithmProviderV1
,SpeedManagerAlgorithmProviderV2
,SpeedManagerImpl.nullProvider
public interface SpeedManagerAlgorithmProvider
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
calculate
(SpeedManagerPingSource[] sources) Called whenever a new set of ping values is available for processingvoid
destroy()
boolean
Indicates whether or not the provider is adjusting download as well as upload limitsint
Returns the current view of when choking occursint
int
Various getters for interesting info shown in stats viewint
int
void
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
Called 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
Ping source has failed- Parameters:
source
-
-
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
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()
-