|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DownloadManagerStats
Method Summary | |
---|---|
float |
getAvailability()
|
long |
getAvailWentBadTime()
|
long |
getBytesUnavailable()
|
int |
getCompleted()
Find out percentage done of current state |
long |
getDataReceiveRate()
|
long |
getDataSendRate()
|
long |
getDiscarded()
|
int |
getDownloadCompleted(boolean bLive)
Retrieve the level of download completion, *including* DND files. |
long |
getDownloadCompletedBytes()
Get the number of bytes of the download that we currently have. |
int |
getDownloadRateLimitBytesPerSecond()
Get the max download rate allowed for this download. |
java.lang.String |
getElapsedTime()
|
long |
getETA()
*deprecated - use getSmoothedETA as the unstability of getETA is pretty bad |
long |
getHashFailBytes()
|
long |
getHashFailCount()
|
long |
getPeakDataReceiveRate()
|
long |
getPeakDataSendRate()
|
int |
getPercentDoneExcludingDND()
|
long |
getProtocolReceiveRate()
|
long |
getProtocolSendRate()
|
int[][] |
getRecentHistory()
Get any recent history. |
long |
getRemaining()
Returns the bytes remaining. |
long |
getRemainingExcludingDND()
|
long |
getSecondsDownloading()
|
long |
getSecondsOnlySeeding()
|
long |
getSessionDataBytesReceived()
|
long |
getSessionDataBytesSent()
|
int |
getShareRatio()
Gives the share ratio of the torrent in 1000ths (i.e. |
long |
getSizeExcludingDND()
|
long |
getSmoothedDataReceiveRate()
|
long |
getSmoothedDataSendRate()
|
long |
getSmoothedETA()
|
int |
getTimeSinceLastDataReceivedInSeconds()
|
int |
getTimeSinceLastDataSentInSeconds()
|
long |
getTimeStarted()
|
long |
getTimeStartedSeeding()
|
long |
getTotalAverage()
Swarm speed |
long |
getTotalAveragePerPeer()
Average for a peer in the swarm |
long |
getTotalDataBytesReceived()
Get the total number of bytes ever downloaded. |
long |
getTotalDataBytesSent()
Get the total number of bytes ever uploaded. |
long |
getTotalGoodDataBytesReceived()
data bytes received minus discards and hashfails |
long |
getTotalProtocolBytesReceived()
|
long |
getTotalProtocolBytesSent()
|
int |
getUploadRateLimitBytesPerSecond()
Get the max upload rate allowed for this download. |
void |
recalcDownloadCompleteBytes()
|
void |
resetTotalBytesSentReceived(long sent,
long received)
Resets the total bytes sent/received - will stop and start the download if it is running |
void |
restoreSessionTotals(long _saved_data_bytes_downloaded,
long _saved_data_bytes_uploaded,
long _saved_discarded,
long _saved_hashfails,
long _saved_SecondsDownloading,
long _saved_SecondsOnlySeeding)
|
void |
setCompleted(int c)
|
void |
setDownloadCompletedBytes(long completedBytes)
|
void |
setDownloadRateLimitBytesPerSecond(int max_rate_bps)
Set the max download rate allowed for this download. |
void |
setRecentHistoryRetention(boolean required)
In general history isn't available, however if this method is called it will start retention for a certain period of time |
void |
setShareRatio(int ratio)
|
void |
setUploadRateLimitBytesPerSecond(int max_rate_bps)
Set the max upload rate allowed for this download. |
Method Detail |
---|
int getCompleted()
Use getDownloadCompleted() if you wish to find out a torrents download completion level
int getDownloadCompleted(boolean bLive)
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.
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.
void setDownloadCompletedBytes(long completedBytes)
long getDownloadCompletedBytes()
Includes bytes downloaded for files marked as DND/Skipped
void recalcDownloadCompleteBytes()
long getTotalDataBytesReceived()
long getTotalGoodDataBytesReceived()
long getTotalProtocolBytesReceived()
long getSessionDataBytesReceived()
long getTotalDataBytesSent()
long getTotalProtocolBytesSent()
long getSessionDataBytesSent()
void resetTotalBytesSentReceived(long sent, long received)
long getRemaining()
long getDiscarded()
long getHashFailBytes()
long getHashFailCount()
int getShareRatio()
void setShareRatio(int ratio)
long getDataReceiveRate()
long getProtocolReceiveRate()
long getDataSendRate()
long getProtocolSendRate()
long getTotalAverage()
long getTotalAveragePerPeer()
void setRecentHistoryRetention(boolean required)
int[][] getRecentHistory()
java.lang.String getElapsedTime()
long getTimeStarted()
long getTimeStartedSeeding()
long getETA()
long getSmoothedETA()
long getPeakDataReceiveRate()
long getPeakDataSendRate()
long getSmoothedDataReceiveRate()
long getSmoothedDataSendRate()
float getAvailability()
long getSecondsDownloading()
long getSecondsOnlySeeding()
void setCompleted(int c)
int getUploadRateLimitBytesPerSecond()
void setUploadRateLimitBytesPerSecond(int max_rate_bps)
max_rate_bps
- limit in bytes per second, 0 for unlimited, -1 for upload disabledint getDownloadRateLimitBytesPerSecond()
void setDownloadRateLimitBytesPerSecond(int max_rate_bps)
max_rate_bps
- limit in bytes per second, 0 for unlimited, -1 for download disabledint getTimeSinceLastDataReceivedInSeconds()
int getTimeSinceLastDataSentInSeconds()
long getAvailWentBadTime()
long getBytesUnavailable()
void restoreSessionTotals(long _saved_data_bytes_downloaded, long _saved_data_bytes_uploaded, long _saved_discarded, long _saved_hashfails, long _saved_SecondsDownloading, long _saved_SecondsOnlySeeding)
long getRemainingExcludingDND()
long getSizeExcludingDND()
int getPercentDoneExcludingDND()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |