FileDocCategorySizeDatePackage
DownloadManagerStats.javaAPI DocAzureus 3.0.3.45191Tue Aug 14 22:27:06 BST 2007org.gudy.azureus2.core3.download

DownloadManagerStats

public interface DownloadManagerStats
author
parg

Fields Summary
Constructors Summary
Methods Summary
public longgetAvailWentBadTime()

public floatgetAvailability()

public intgetCompleted()
Find out percentage done of current state Use getDownloadCompleted() if you wish to find out a torrents download completion level

return
0 to 1000, 0% to 100% respectively When state is Allocating, Checking, or Initializing, this returns the % done of that task Any other state MAY return getDownloadCompleted()

public longgetDataReceiveRate()

public longgetDataSendRate()

public longgetDiscarded()

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

public intgetDownloadRateLimitBytesPerSecond()
Get the max download rate allowed for this download.

return
download rate in bytes per second, 0 for unlimited, -1 for download disabled

public longgetETA()

public java.lang.StringgetElapsedTime()

public longgetHashFailBytes()

public longgetHashFailCount()

public longgetProtocolReceiveRate()

public longgetProtocolSendRate()

public longgetRemaining()

public longgetSecondsDownloading()

public longgetSecondsOnlySeeding()

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

public intgetTimeSinceLastDataReceivedInSeconds()

public intgetTimeSinceLastDataSentInSeconds()

public longgetTimeStarted()

public longgetTimeStartedSeeding()

public longgetTotalAverage()
Swarm speed

return

public longgetTotalAveragePerPeer()
Average for a peer in the swarm

return

public longgetTotalDataBytesReceived()
Get the total number of bytes ever downloaded.

return
total bytes downloaded

public longgetTotalDataBytesSent()
Get the total number of bytes ever uploaded.

return
total bytes uploaded

public longgetTotalGoodDataBytesReceived()
data bytes received minus discards and hashfails

return

public longgetTotalProtocolBytesReceived()

public longgetTotalProtocolBytesSent()

public intgetUploadRateLimitBytesPerSecond()
Get the max upload rate allowed for this download.

return
upload rate in bytes per second, 0 for unlimited, -1 for upload disabled

public voidrestoreSessionTotals(long _saved_data_bytes_downloaded, long _saved_data_bytes_uploaded, long _saved_discarded, long _saved_hashfails, long _saved_SecondsDownloading, long _saved_SecondsOnlySeeding)

public voidsetCompleted(int c)

public voidsetDownloadCompleted(int completed)

public voidsetDownloadRateLimitBytesPerSecond(int max_rate_bps)
Set the max download rate allowed for this download.

param
max_rate_bps limit in bytes per second, 0 for unlimited, -1 for download disabled

public voidsetUploadRateLimitBytesPerSecond(int max_rate_bps)
Set the max upload rate allowed for this download.

param
max_rate_bps limit in bytes per second, 0 for unlimited, -1 for upload disabled