FileDocCategorySizeDatePackage
SpeedManagerAlgorithmProviderV2.javaAPI DocAzureus 3.0.3.45090Sun Aug 05 14:13:58 BST 2007com.aelitis.azureus.core.speedmanager.impl.v2

SpeedManagerAlgorithmProviderV2

public class SpeedManagerAlgorithmProviderV2 extends Object implements com.aelitis.azureus.core.speedmanager.impl.SpeedManagerAlgorithmProvider

Fields Summary
private com.aelitis.azureus.core.speedmanager.impl.SpeedManagerAlgorithmProviderAdapter
adapter
private com.aelitis.azureus.core.speedmanager.impl.SpeedManagerAlgorithmProvider
strategy
public static final String
SETTING_DOWNLOAD_MAX_LIMIT
public static final String
SETTING_UPLOAD_MAX_LIMIT
public static final String
SETTING_UPLOAD_LIMIT_ESTIMATE_TYPE_FROM_UI
public static final String
SETTING_DOWNLOAD_LIMIT_ESTIMATE_TYPE_FROM_UI
public static final String
SETTING_DATA_SOURCE_INPUT
public static final String
SETTING_DHT_GOOD_SET_POINT
public static final String
SETTING_DHT_GOOD_TOLERANCE
public static final String
SETTING_DHT_BAD_SET_POINT
public static final String
SETTING_DHT_BAD_TOLERANCE
public static final String
SETTING_WAIT_AFTER_ADJUST
public static final String
SETTING_INTERVALS_BETWEEN_ADJUST
public static final String
SETTING_V2_BETA_ENABLED
Constructors Summary
public SpeedManagerAlgorithmProviderV2(com.aelitis.azureus.core.speedmanager.impl.SpeedManagerAlgorithmProviderAdapter _adapter)



    
	
			 
	
		adapter	= _adapter;
		adapter.setLoggingEnabled( true );

        //strategy = new SpeedManagerAlgorithmProviderDHTPing(_adapter);
        strategy = new SpeedManagerAlgorithmProviderPingMap(_adapter);
    
Methods Summary
public voidcalculate(com.aelitis.azureus.core.speedmanager.SpeedManagerPingSource[] sources)

		String	str = "";
		
		for (int i=0;i<sources.length;i++){
			
			str += (i==0?"":",") + sources[i].getAddress() + " -> " + sources[i].getPingTime();
		}
		
		log( "ping-data: " + str );


        strategy.calculate(sources);
    
public voiddestroy()

    	strategy.destroy();
    
public booleangetAdjustsDownloadLimits()

		// TODO Auto-generated method stub
		return false;
	
public intgetCurrentChokeSpeed()

        return strategy.getCurrentChokeSpeed();
	
public intgetCurrentPingMillis()

        return strategy.getCurrentPingMillis();
	
public intgetIdlePingMillis()

        return strategy.getIdlePingMillis();
	
public intgetMaxPingMillis()

        return strategy.getMaxPingMillis();
	
public intgetMaxUploadSpeed()

        
        return strategy.getMaxUploadSpeed();
	
protected voidlog(java.lang.String str)

        SpeedManagerLogger.log( str );
    
public voidpingSourceFailed(com.aelitis.azureus.core.speedmanager.SpeedManagerPingSource source)

		log( "Lost ping source: " + source.getAddress());

        strategy.pingSourceFailed(source);
    
public voidpingSourceFound(com.aelitis.azureus.core.speedmanager.SpeedManagerPingSource source, boolean is_replacement)

		log( "Found ping source: " + source.getAddress());

        strategy.pingSourceFound(source,is_replacement);
    
public voidreset()

        strategy.reset();
    
public voidupdateStats()

        strategy.updateStats();