FileDocCategorySizeDatePackage
SpeedTestData.javaAPI DocAzureus 3.0.3.43016Wed May 30 15:17:10 BST 2007org.gudy.azureus2.ui.swt.speedtest

SpeedTestData

public class SpeedTestData extends Object
Use this class to store data that should persist across panels.

Fields Summary
private static SpeedTestData
ourInstance
private String
lastTestData
private com.aelitis.azureus.core.networkmanager.admin.NetworkAdminSpeedTesterResult
lastResult
private int
highestDownloadOnlyResult
private int
lastUploadOnlyResult
Constructors Summary
private SpeedTestData()

    
Methods Summary
public intgetHightestDownloadResult()

return
- int

        return highestDownloadOnlyResult;
    
public static org.gudy.azureus2.ui.swt.speedtest.SpeedTestDatagetInstance()


        
        return ourInstance;
    
public com.aelitis.azureus.core.networkmanager.admin.NetworkAdminSpeedTesterResultgetLastResult()

        return lastResult;
    
public java.lang.StringgetLastTestData()

        return lastTestData;
    
public intgetLastUploadOnlyResult()

        return lastUploadOnlyResult;
    
public voidsetHighestDownloadResult(int currDownRateInKBytePerSec)
We are keeping the highest download result, since we want results biased toward fast downloads.

param
currDownRateInKBytePerSec - result of a "download only" test.

        if( highestDownloadOnlyResult<currDownRateInKBytePerSec ){
            highestDownloadOnlyResult=currDownRateInKBytePerSec;
        }
    
public voidsetLastTestData(java.lang.String text)

        lastTestData = text;
    
public voidsetLastUploadOnlyResult(int currUpRateInKBytesPerSec)
Record the last upload only result, but the minimum allowed result is 20 kbytes/sec.

param
currUpRateInKBytesPerSec -


        //The lowest upload rate allowed in 20 kB/s.
        if(currUpRateInKBytesPerSec<20){
            currUpRateInKBytesPerSec=20;
        }

        lastUploadOnlyResult = currUpRateInKBytesPerSec;
    
public voidsetResult(com.aelitis.azureus.core.networkmanager.admin.NetworkAdminSpeedTesterResult result)

        lastResult = result;