FileDocCategorySizeDatePackage
LimitControlPreferDownload.javaAPI DocAzureus 3.0.3.42809Thu Jul 26 18:27:32 BST 2007com.aelitis.azureus.core.speedmanager.impl.v2

LimitControlPreferDownload

public class LimitControlPreferDownload extends Object implements LimitControl
Prefer the download, but something like 80,20

Fields Summary
LimitControlSetting
setting
float
upMidPoint
float
downMidPoint
int
upMax
int
upMin
int
downMax
int
downMin
TransferMode
mode
float
percentUpMaxUsed
boolean
isDownloadUnlimited
Constructors Summary
Methods Summary
public SMUpdateadjust(float amount)


        

        setting.adjust( amount );

        int upMaxUsed = upMax;
        if( mode.getMode() == TransferMode.State.DOWNLOADING ){

            upMaxUsed = Math.round( upMax*percentUpMaxUsed );
        }

        float normalizedUp;
        float normalizedDown;
        if( setting.getValue()>0.5f  ){
            //calculate rates above this limit.

        }else{
            //calculate rates below this limit.

        }

        return new SMUpdate(0,true,0,true);//Till implemented.

        //return null;  //To change body of implemented methods use File | Settings | File Templates.
    
public booleanisDownloadUnlimitedMode()

        return isDownloadUnlimited;  
    
public voidsetDownloadUnlimitedMode(boolean isUnlimited)

        isDownloadUnlimited = isUnlimited;
    
public voidupdateLimits(int upMax, int upMin, int downMax, int downMin)

        //To change body of implemented methods use File | Settings | File Templates.
    
public voidupdateSeedSettings(float downloadModeUsed)

        //To change body of implemented methods use File | Settings | File Templates.
    
public voidupdateStatus(int currUpLimit, SaturatedMode uploadUsage, int currDownLimit, SaturatedMode downloadUsage, TransferMode transferMode)

        //To change body of implemented methods use File | Settings | File Templates.