com.aelitis.azureus.core.speedmanager.impl
Interface SpeedManagerAlgorithmProvider

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

public interface SpeedManagerAlgorithmProvider


Field Summary
static int UPDATE_PERIOD_MILLIS
           
 
Method Summary
 void calculate(SpeedManagerPingSource[] sources)
          Called whenever a new set of ping values is available for processing
 void destroy()
           
 boolean getAdjustsDownloadLimits()
          Indicates whether or not the provider is adjusting download as well as upload limits
 int getCurrentChokeSpeed()
          Returns the current view of when choking occurs
 int getCurrentPingMillis()
           
 int getIdlePingMillis()
          Various getters for interesting info shown in stats view
 int getMaxPingMillis()
           
 int getMaxUploadSpeed()
           
 void pingSourceFailed(SpeedManagerPingSource source)
          Ping source has failed
 void pingSourceFound(SpeedManagerPingSource source, boolean is_replacement)
          Called when a new source of ping times has been found
 void reset()
          Reset any state to start of day values
 void 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()