Class SpeedManagerAlgorithmProviderV2
java.lang.Object
com.biglybt.core.speedmanager.impl.v2.SpeedManagerAlgorithmProviderV2
- All Implemented Interfaces:
SpeedManagerAlgorithmProvider
public class SpeedManagerAlgorithmProviderV2
extends Object
implements SpeedManagerAlgorithmProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SpeedManagerAlgorithmProviderAdapterstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate final SpeedManagerAlgorithmProviderFields inherited from interface SpeedManagerAlgorithmProvider
UPDATE_PERIOD_MILLIS -
Constructor Summary
ConstructorsConstructorDescription -
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 viewintlongprotected voidvoidPing 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
-
adapter
-
strategy
-
SETTING_DOWNLOAD_MAX_LIMIT
- See Also:
-
SETTING_UPLOAD_MAX_LIMIT
- See Also:
-
SETTING_UPLOAD_LIMIT_ESTIMATE_TYPE_FROM_UI
- See Also:
-
SETTING_DOWNLOAD_LIMIT_ESTIMATE_TYPE_FROM_UI
- See Also:
-
SETTING_DATA_SOURCE_INPUT
- See Also:
-
SETTING_DHT_GOOD_SET_POINT
- See Also:
-
SETTING_DHT_GOOD_TOLERANCE
- See Also:
-
SETTING_DHT_BAD_SET_POINT
- See Also:
-
SETTING_DHT_BAD_TOLERANCE
- See Also:
-
SETTING_WAIT_AFTER_ADJUST
- See Also:
-
SETTING_INTERVALS_BETWEEN_ADJUST
- See Also:
-
SETTING_V2_BETA_ENABLED
- See Also:
-
-
Constructor Details
-
SpeedManagerAlgorithmProviderV2
-
-
Method Details
-
destroy
public void destroy()- Specified by:
destroyin interfaceSpeedManagerAlgorithmProvider
-
reset
public void reset()Description copied from interface:SpeedManagerAlgorithmProviderReset any state to start of day values- Specified by:
resetin interfaceSpeedManagerAlgorithmProvider
-
updateStats
public void updateStats()Description copied from interface:SpeedManagerAlgorithmProviderCalled periodically (see period above) to allow stats to be updated.- Specified by:
updateStatsin interfaceSpeedManagerAlgorithmProvider
-
pingSourceFound
Description copied from interface:SpeedManagerAlgorithmProviderCalled when a new source of ping times has been found- Specified by:
pingSourceFoundin interfaceSpeedManagerAlgorithmProvider- Parameters:
source-is_replacement- One of the initial sources or a replacement for a failed one
-
pingSourceFailed
Description copied from interface:SpeedManagerAlgorithmProviderPing source has failed- Specified by:
pingSourceFailedin interfaceSpeedManagerAlgorithmProvider- Parameters:
source-
-
calculate
Description copied from interface:SpeedManagerAlgorithmProviderCalled whenever a new set of ping values is available for processing- Specified by:
calculatein interfaceSpeedManagerAlgorithmProvider- Parameters:
sources-
-
getIdlePingMillis
public int getIdlePingMillis()Description copied from interface:SpeedManagerAlgorithmProviderVarious getters for interesting info shown in stats view- Specified by:
getIdlePingMillisin interfaceSpeedManagerAlgorithmProvider- Returns:
-
getCurrentPingMillis
public int getCurrentPingMillis()- Specified by:
getCurrentPingMillisin interfaceSpeedManagerAlgorithmProvider
-
getMaxPingMillis
public int getMaxPingMillis()- Specified by:
getMaxPingMillisin interfaceSpeedManagerAlgorithmProvider
-
getCurrentChokeSpeed
public long getCurrentChokeSpeed()Description copied from interface:SpeedManagerAlgorithmProviderReturns the current view of when choking occurs- Specified by:
getCurrentChokeSpeedin interfaceSpeedManagerAlgorithmProvider- Returns:
- speed in bytes/sec
-
getMaxUploadSpeed
public long getMaxUploadSpeed()- Specified by:
getMaxUploadSpeedin interfaceSpeedManagerAlgorithmProvider
-
getAdjustsDownloadLimits
public boolean getAdjustsDownloadLimits()Description copied from interface:SpeedManagerAlgorithmProviderIndicates whether or not the provider is adjusting download as well as upload limits- Specified by:
getAdjustsDownloadLimitsin interfaceSpeedManagerAlgorithmProvider- Returns:
-
log
-