|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gudy.azureus2.pluginsimpl.remote.RPObject
org.gudy.azureus2.pluginsimpl.remote.download.RPDownloadStats
public class RPDownloadStats
| Field Summary | |
|---|---|
float |
availability
|
long |
bytesUnavailable
|
int |
completed
|
protected DownloadStats |
delegate
|
long |
download_average
|
int |
downloadCompletedLive
|
int |
downloadCompletedStored
|
long |
downloaded
|
java.lang.String |
eta
|
int |
health
|
int |
share_ratio
|
java.lang.String |
status
|
java.lang.String |
status_localised
|
long |
upload_average
|
long |
uploaded
|
| Fields inherited from class org.gudy.azureus2.pluginsimpl.remote.RPObject |
|---|
__delegate, _dispatcher, _object_id, next_key, object_registry, object_registry_reverse |
| Fields inherited from interface org.gudy.azureus2.plugins.download.DownloadStats |
|---|
HEALTH_ERROR, HEALTH_KO, HEALTH_NO_REMOTE, HEALTH_NO_TRACKER, HEALTH_OK, HEALTH_STOPPED |
| Constructor Summary | |
|---|---|
protected |
RPDownloadStats(DownloadStats _delegate)
|
| Method Summary | |
|---|---|
RPReply |
_process(RPRequest request)
|
protected void |
_setDelegate(java.lang.Object _delegate)
|
java.lang.Object |
_setLocal()
|
static RPDownloadStats |
create(DownloadStats _delegate)
|
float |
getAvailability()
Gives the currently seen availability of the torrent |
long |
getBytesUnavailable()
Return the number of bytes of data fromt he torrent that is unavailable given the current sources (peers). |
int |
getCheckingDoneInThousandNotation()
if isChecking then returns completeness, 1000 -> 100% |
int |
getCompleted()
returns a value between 0 and 1000 giving the completion status of the current download task (e.g. |
long |
getDiscarded()
Gives the number of bytes discarded. |
long |
getDownloadAverage()
Gives average number of bytes downloaded in last second |
long |
getDownloadAverage(boolean include_protocol)
|
int |
getDownloadCompleted(boolean bLive)
Retrieve the level of download completion, *including* DND files. |
java.lang.String |
getDownloadDirectory()
Gives access to the directory into which the download is being saved |
long |
getDownloaded()
Gives the number of bytes downloaded |
long |
getDownloaded(boolean include_protocol)
|
java.lang.String |
getElapsedTime()
Gives the elapsed download time as a string |
java.lang.String |
getETA()
Gives the estimated time to completion as a string |
long |
getETASecs()
ETA time in seconds. |
long |
getHashFails()
Gives the number of bytes thrown away due to piece hash check fails |
int |
getHealth()
returns an indication of the health of the torrent |
long |
getRemaining()
Gives number of bytes remaining. |
long |
getRemainingExcludingDND()
|
long |
getSecondsDownloading()
Return the # of seconds that the torrent has been downloading. |
long |
getSecondsOnlySeeding()
Return the # of seconds that the torrent has been only seeding. |
long |
getSecondsSinceLastDownload()
Returns the number of seconds running time since data was downloaded, -1 if never |
long |
getSecondsSinceLastUpload()
Returns the number of seconds running time since data was uploaded, -1 if never |
int |
getShareRatio()
Gives the share ratio of the torrent in 1000ths (i.e. |
java.lang.String |
getStatus()
Returns an overall string representing the state of the download |
java.lang.String |
getStatus(boolean localised)
Returns an overall string representing the state of the download *localised* |
java.lang.String |
getTargetFileOrDir()
Gives access to the target file or directory that the download is being saved to |
long |
getTimeStarted()
in ms since epoch |
long |
getTimeStartedSeeding()
Time that the torrent started seeding. |
long |
getTotalAverage()
Gives average number of bytes computed for torrent in last second |
java.lang.String |
getTrackerStatus()
returns an general status string for the tracker |
long |
getUploadAverage()
Gives average number of bytes uploaded in last second |
long |
getUploadAverage(boolean include_protocol)
|
long |
getUploaded()
Gives the number of bytes uploaded |
long |
getUploaded(boolean include_protocol)
|
void |
resetUploadedDownloaded(long l1,
long l2)
resets totals. |
| Methods inherited from class org.gudy.azureus2.pluginsimpl.remote.RPObject |
|---|
_fixupLocal, _getDelegate, _getName, _getOID, _lookupLocal, _lookupLocal, _refresh, _setRemote, getDispatcher, notSupported, notSupported |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient DownloadStats delegate
public long downloaded
public long uploaded
public int completed
public int downloadCompletedLive
public int downloadCompletedStored
public java.lang.String status
public java.lang.String status_localised
public long upload_average
public long download_average
public java.lang.String eta
public int share_ratio
public float availability
public long bytesUnavailable
public int health
| Constructor Detail |
|---|
protected RPDownloadStats(DownloadStats _delegate)
| Method Detail |
|---|
public static RPDownloadStats create(DownloadStats _delegate)
protected void _setDelegate(java.lang.Object _delegate)
_setDelegate in class RPObject
public java.lang.Object _setLocal()
throws RPException
_setLocal in class RPObjectRPExceptionpublic RPReply _process(RPRequest request)
_process in class RPObjectpublic java.lang.String getStatus()
DownloadStats
getStatus in interface DownloadStatspublic java.lang.String getStatus(boolean localised)
DownloadStats
getStatus in interface DownloadStatspublic java.lang.String getDownloadDirectory()
DownloadStats
getDownloadDirectory in interface DownloadStatspublic java.lang.String getTargetFileOrDir()
DownloadStats
getTargetFileOrDir in interface DownloadStatspublic java.lang.String getTrackerStatus()
DownloadStats
getTrackerStatus in interface DownloadStatspublic int getCompleted()
DownloadStats
getCompleted in interface DownloadStatspublic int getDownloadCompleted(boolean bLive)
DownloadStats
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.
getDownloadCompleted in interface DownloadStatsbLive - 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.
public int getCheckingDoneInThousandNotation()
DownloadStats
getCheckingDoneInThousandNotation in interface DownloadStats
public void resetUploadedDownloaded(long l1,
long l2)
DownloadStats
resetUploadedDownloaded in interface DownloadStatspublic long getDownloaded()
DownloadStats
getDownloaded in interface DownloadStatspublic long getDownloaded(boolean include_protocol)
getDownloaded in interface DownloadStatspublic long getUploaded()
DownloadStats
getUploaded in interface DownloadStatspublic long getUploaded(boolean include_protocol)
getUploaded in interface DownloadStatspublic long getRemaining()
DownloadStats
getRemaining in interface DownloadStatspublic long getDiscarded()
DownloadStatsDownloadStats.getHashFails()
(ex. end game mode where multiple peers send same block, et)
getDiscarded in interface DownloadStatspublic long getDownloadAverage()
DownloadStats
getDownloadAverage in interface DownloadStatspublic long getDownloadAverage(boolean include_protocol)
getDownloadAverage in interface DownloadStatspublic long getUploadAverage()
DownloadStats
getUploadAverage in interface DownloadStatspublic long getUploadAverage(boolean include_protocol)
getUploadAverage in interface DownloadStatspublic long getTotalAverage()
DownloadStats
getTotalAverage in interface DownloadStatspublic java.lang.String getElapsedTime()
DownloadStats
getElapsedTime in interface DownloadStatspublic java.lang.String getETA()
DownloadStats
getETA in interface DownloadStatspublic long getETASecs()
DownloadStats
getETASecs in interface DownloadStatspublic long getHashFails()
DownloadStats
getHashFails in interface DownloadStatspublic int getShareRatio()
DownloadStats
getShareRatio in interface DownloadStatspublic long getTimeStarted()
DownloadStats
getTimeStarted in interface DownloadStatspublic float getAvailability()
DownloadStats
getAvailability in interface DownloadStatspublic long getSecondsDownloading()
DownloadStats
getSecondsDownloading in interface DownloadStatspublic long getSecondsOnlySeeding()
DownloadStats
getSecondsOnlySeeding in interface DownloadStatspublic long getTimeStartedSeeding()
DownloadStats
getTimeStartedSeeding in interface DownloadStatspublic long getSecondsSinceLastDownload()
DownloadStats
getSecondsSinceLastDownload in interface DownloadStatspublic long getSecondsSinceLastUpload()
DownloadStats
getSecondsSinceLastUpload in interface DownloadStatspublic int getHealth()
DownloadStats
getHealth in interface DownloadStatspublic long getBytesUnavailable()
DownloadStats
getBytesUnavailable in interface DownloadStatspublic long getRemainingExcludingDND()
getRemainingExcludingDND in interface DownloadStats
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||