public final class TorrentStatus
extends java.lang.Object
TorrentHandle.status()
Modifier and Type | Class and Description |
---|---|
static class |
TorrentStatus.State
the different overall states a torrent can be in.
|
Constructor and Description |
---|
TorrentStatus(torrent_status ts)
Internal, don't use it in your code.
|
Modifier and Type | Method and Description |
---|---|
long |
activeDuration() |
long |
addedTime()
The posix-time (in milliseconds) when this torrent was added.
|
long |
allTimeDownload()
This is the accumulated download payload byte counters.
|
long |
allTimeUpload()
This is the accumulated upload payload byte counter.
|
boolean |
announcingToDht()
These are set to true if this torrent is allowed to announce to the
respective peer source.
|
boolean |
announcingToLsd()
These are set to true if this torrent is allowed to announce to the
respective peer source.
|
boolean |
announcingToTrackers()
These are set to true if this torrent is allowed to announce to the
respective peer source.
|
int |
blockSize()
the size of a block, in bytes.
|
long |
completedTime()
The posix-time (in milliseconds) when this torrent was finished.
|
int |
connectCandidates()
the number of peers in this torrent's peer list that is a candidate to
be connected to.
|
int |
connectionsLimit()
get limit of number of connections for this torrent.
|
java.lang.String |
currentTracker()
the URL of the last working tracker.
|
float |
distributedCopies()
the number of distributed copies of the file.
|
int |
distributedFraction()
tells the share of pieces that have more copies than the rarest
// piece(s).
|
int |
distributedFullCopies()
the number of distributed copies of the torrent.
|
int |
downBandwidthQueue()
the number of peers in this torrent that are waiting for more bandwidth quota from the torrent rate limiter.
|
int |
downloadPayloadRate()
The total transfer rate of payload only, not counting protocol chatter.
|
int |
downloadRate()
The total rates for all peers for this torrent.
|
ErrorCode |
errorCode()
May be set to an error message describing why the torrent
was paused, in case it was paused by an error.
|
long |
finishedDuration() |
boolean |
hasIncoming()
true if there has ever been an incoming connection attempt to this
torrent.
|
boolean |
hasMetadata()
true if this torrent has metadata (either it was started from a
.torrent file or the metadata has been downloaded).
|
Sha1Hash |
infoHash()
the info-hash for this torrent.
|
boolean |
ipFilterApplies()
true if the session global IP filter applies
to this torrent.
|
boolean |
isAutoManaged()
set to true if the torrent is auto managed, i.e.
|
boolean |
isFinished()
Returns
true if all pieces that have a
priority > 0 are downloaded. |
boolean |
isMovingStorage()
this is true if this torrent's storage is currently being moved from
one location to another.
|
boolean |
isPaused()
set to true if the torrent is paused and false otherwise.
|
boolean |
isSeeding()
true if all pieces have been downloaded.
|
boolean |
isSeedMode()
true if the torrent is in seed_mode.
|
boolean |
isSequentialDownload()
true when the torrent is in sequential download mode.
|
boolean |
isShareMode()
true if the torrent is currently in share-mode, i.e.
|
boolean |
isSuperSeeding()
true if the torrent is in super seeding mode.
|
boolean |
isUploadMode()
true if the torrent is blocked from downloading.
|
long |
lastDownload() |
long |
lastSeenComplete()
The time (in milliseconds) when we, or one of our peers, last saw a complete copy of this torrent.
|
long |
lastUpload() |
int |
listPeers()
The number of seeds in our peer list and the total number of peers (including seeds).
|
int |
listSeeds()
The number of seeds in our peer list and the total number of peers (including seeds).
|
java.lang.String |
name()
Returns the name of the torrent.
|
boolean |
needSaveResume()
true if this torrent has unsaved changes
to its download state and statistics since the last resume data
was saved.
|
long |
nextAnnounce()
The time until the torrent will announce itself to the tracker (in milliseconds).
|
int |
numComplete()
If the tracker sends scrape info in its announce reply, these fields
will be set to the total number of peers that have the whole file and
the total number of peers that are still downloading.
|
int |
numConnections()
Returns the number of peer connections this torrent has,
including half-open connections that hasn't completed the
bittorrent handshake yet.
|
int |
numIncomplete()
If the tracker sends scrape info in its announce reply, these fields
will be set to the total number of peers that have the whole file and
the total number of peers that are still downloading.
|
int |
numPeers()
The number of peers this torrent currently is connected to.
|
int |
numPieces()
Returns the number of pieces that has been downloaded so you don't have
to count yourself.
|
int |
numSeeds()
The number of peers that are seeding that this client is currently connected to.
|
int |
numUploads()
the number of unchoked peers in this torrent.
|
PieceIndexBitfield |
pieces()
A bitmask that represents which pieces we have (set to true) and the
pieces we don't have.
|
float |
progress()
A value in the range [0, 1], that represents the progress of the torrent's
current task.
|
int |
progressPpm()
progress parts per million (progress * 1000000) when disabling
floating point operations, this is the only option to query progress
|
int |
queuePosition()
the position this torrent has in the download
queue.
|
long |
seedingDuration() |
int |
seedRank()
A rank of how important it is to seed the torrent, it is used to determine which torrents to seed and which to queue.
|
TorrentStatus.State |
state()
The main state the torrent is in.
|
boolean |
stopWhenReady()
This reflects whether the ``stop_when_ready`` flag is currently enabled
on this torrent.
|
StorageMode |
storageMode()
The allocation mode for the torrent.
|
torrent_status |
swig() |
long |
totalDone()
The total number of bytes of the file(s) that we have.
|
long |
totalDownload()
The number of bytes downloaded and uploaded to all peers, accumulated, this session
only.
|
long |
totalFailedBytes()
The number of bytes that has been downloaded and that has failed the
piece hash test.
|
long |
totalPayloadDownload()
Counts the amount of bytes received this session, but only
the actual payload data (i.e the interesting data), these counters
ignore any protocol overhead.
|
long |
totalPayloadUpload()
Counts the amount of bytes send this session, but only
the actual payload data (i.e the interesting data), these counters
ignore any protocol overhead.
|
long |
totalRedundantBytes()
The number of bytes that has been downloaded even though that data
already was downloaded.
|
long |
totalUpload()
The number of bytes downloaded and uploaded to all peers, accumulated, this session
only.
|
long |
totalWanted()
The total number of bytes we want to download.
|
long |
totalWantedDone()
The number of bytes we have downloaded, only counting the pieces that we actually want
to download.
|
int |
upBandwidthQueue()
the number of peers in this torrent that are waiting for more bandwidth quota from the torrent rate limiter.
|
int |
uploadPayloadRate()
The total transfer rate of payload only, not counting protocol chatter.
|
int |
uploadRate()
The total rates for all peers for this torrent.
|
int |
uploadsLimit()
get limit of upload slots (unchoked peers) for this torrent.
|
PieceIndexBitfield |
verifiedPieces()
A bitmask representing which pieces has had their hash checked.
|
public TorrentStatus(torrent_status ts)
ts
- public torrent_status swig()
public ErrorCode errorCode()
public java.lang.String name()
public long nextAnnounce()
public java.lang.String currentTracker()
public long totalDownload()
public long totalUpload()
public long totalPayloadDownload()
public long totalPayloadUpload()
public long totalFailedBytes()
public long totalRedundantBytes()
public PieceIndexBitfield pieces()
public PieceIndexBitfield verifiedPieces()
public long totalDone()
public long totalWantedDone()
public long totalWanted()
public long allTimeUpload()
public long allTimeDownload()
public long addedTime()
public long completedTime()
public long lastSeenComplete()
public final StorageMode storageMode()
StorageMode
public float progress()
public int progressPpm()
reflects the same value as ``progress``, but instead in a range [0, 1000000] (ppm = parts per million). When floating point operations are disabled, this is the only alternative to the floating point value in.
public int queuePosition()
public int downloadRate()
public int uploadRate()
public int downloadPayloadRate()
public int uploadPayloadRate()
public int numSeeds()
public int numPeers()
public int numComplete()
public int numIncomplete()
public int listSeeds()
public int listPeers()
public int connectCandidates()
public int numPieces()
public int distributedFullCopies()
public int distributedFraction()
public float distributedCopies()
the integer part tells how many copies there are of the rarest piece(s)
the fractional part tells the fraction of pieces that have more copies than the rarest piece(s).
public int blockSize()
public int numUploads()
public int numConnections()
This is always >= num_peers
.
public int uploadsLimit()
public int connectionsLimit()
public int upBandwidthQueue()
public int downBandwidthQueue()
public int seedRank()
public TorrentStatus.State state()
public boolean needSaveResume()
public boolean ipFilterApplies()
public boolean isUploadMode()
public boolean isShareMode()
public boolean isSuperSeeding()
public boolean isPaused()
public boolean isAutoManaged()
public boolean isSequentialDownload()
public boolean isSeeding()
public boolean isFinished()
true
if all pieces that have a
priority > 0
are downloaded. There is
only a distinction between finished and seeding if some pieces or
files have been set to priority 0, i.e. are not downloaded.true
if all pieces that have a priority > 0
are downloaded.public boolean hasMetadata()
public boolean hasIncoming()
public boolean isSeedMode()
public boolean isMovingStorage()
public boolean announcingToTrackers()
public boolean announcingToLsd()
public boolean announcingToDht()
public boolean stopWhenReady()
TorrentHandle.stopWhenReady(boolean)
.public Sha1Hash infoHash()
public long lastUpload()
public long lastDownload()
public long activeDuration()
public long finishedDuration()
public long seedingDuration()