FileDocCategorySizeDatePackage
DownloadStats.javaAPI DocAzureus 3.0.3.46683Tue Dec 26 14:01:30 GMT 2006org.gudy.azureus2.plugins.download

DownloadStats

public interface DownloadStats
author
parg This class gives access to various stats associated with the download

Fields Summary
public static final int
HEALTH_STOPPED
public static final int
HEALTH_NO_TRACKER
public static final int
HEALTH_NO_REMOTE
public static final int
HEALTH_OK
public static final int
HEALTH_KO
not connected to any peer and downloading
public static final int
HEALTH_ERROR
download in STATE_ERROR, see {@link #getStatus()} for error
Constructors Summary
Methods Summary
public floatgetAvailability()
Gives the currently seen availability of the torrent

return
since
2.0.8.2

public intgetCheckingDoneInThousandNotation()
if isChecking then returns completeness, 1000 -> 100%

return

public intgetCompleted()
returns a value between 0 and 1000 giving the completion status of the current download task (e.g. checking, downloading)

return
since
2.0.7.0

public longgetDiscarded()
Gives the number of bytes discarded

return
since
2.0.7.0

public longgetDownloadAverage()
Gives average number of bytes downloaded in last second

return
since
2.0.7.0

public intgetDownloadCompleted(boolean bLive)
Retrieve the level of download completion. To understand the bLive parameter, you must know a bit about the Torrent activation process: 1) Torrent goes into ST_WAITING 2) Torrent moves to ST_PREPARING 3) Torrent moves to ST_DOWNLOADING or ST_SEEDING While in ST_PREPARING, Completion Level is rebuilt (either via Fast Resume or via piece checking). Quite often, the download completion level before ST_PREPARING and after ST_PREPARING are identical. Before going into ST_PREPARING, we store the download completion level. If you wish to retrieve this value instead of the live "building" one, pass false for the parameter.

param
bLive true - Always returns the known completion level of the torrent false - In the case of ST_PREPARING, return completion level before of the torrent ST_PREPARING started. Otherwise, same as true.
return
0 - 1000
since
2.0.8.0

public java.lang.StringgetDownloadDirectory()
Gives access to the directory into which the download is being saved

return
since
2.0.7.0

public longgetDownloaded()
Gives the number of bytes downloaded

return
since
2.0.7.0

public java.lang.StringgetETA()
Gives the estimated time to completion as a string

return
since
2.0.7.0

public java.lang.StringgetElapsedTime()
Gives the elapsed download time as a string

return
since
2.0.7.0

public longgetHashFails()
Gives the number of bytes thrown away due to piece hash check fails

return
since
2.0.7.0

public intgetHealth()
returns an indication of the health of the torrent

return
see above HEALTH constants

public longgetRemaining()
Gives number of bytes remaining

return

public longgetSecondsDownloading()

public longgetSecondsOnlySeeding()

public longgetSecondsSinceLastDownload()
Returns the number of seconds running time since data was downloaded, -1 if never

since
2501
return

public longgetSecondsSinceLastUpload()
Returns the number of seconds running time since data was uploaded, -1 if never

since
2501
return

public intgetShareRatio()
Gives the share ratio of the torrent in 1000ths (i.e. 1000 = share ratio of 1)

return
since
2.0.7.0

public java.lang.StringgetStatus()
Returns an overall string representing the state of the download

return
since
2.0.7.0

public java.lang.StringgetStatus(boolean localised)
Returns an overall string representing the state of the download *localised*

return
since
2.3.0.7

public java.lang.StringgetTargetFileOrDir()
Gives access to the target file or directory that the download is being saved to

return
since
2.0.7.0

public longgetTimeStarted()
in ms since epoch

since
2.0.8.0

public longgetTimeStartedSeeding()

public longgetTotalAverage()
Gives average number of bytes computed for torrent in last second

return
since
2.0.7.0

public java.lang.StringgetTrackerStatus()
returns an general status string for the tracker

return
since
2.0.7.0

public longgetUploadAverage()
Gives average number of bytes uploaded in last second

return
since
2.0.7.0

public longgetUploaded()
Gives the number of bytes uploaded

return
since
2.0.7.0