LimitControlPreferDownloadpublic class LimitControlPreferDownload extends Object implements LimitControlPrefer 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 |
Methods Summary |
---|
public SMUpdate | adjust(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 boolean | isDownloadUnlimitedMode()
return isDownloadUnlimited;
| public void | setDownloadUnlimitedMode(boolean isUnlimited)
isDownloadUnlimited = isUnlimited;
| public void | updateLimits(int upMax, int upMin, int downMax, int downMin)
//To change body of implemented methods use File | Settings | File Templates.
| public void | updateSeedSettings(float downloadModeUsed)
//To change body of implemented methods use File | Settings | File Templates.
| public void | updateStatus(int currUpLimit, SaturatedMode uploadUsage, int currDownLimit, SaturatedMode downloadUsage, TransferMode transferMode)
//To change body of implemented methods use File | Settings | File Templates.
|
|