public class TorrentInfo extends Object
| Constructor and Description |
|---|
TorrentInfo(Torrent torrent,
Clock clock) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDownloadCount()
The amount of times this torrent has been downloaded
If the tracker returns 0 it will return N/A as the tracker apparently doesn't support it |
TrackerEvent |
getEvent()
Gets the current tracker event for this
Torrent |
int |
getLeechers()
The amount of leechers as reported by the tracker
|
int |
getSeeders()
The amount of seeders as reported by the tracker
|
Duration |
getTimeSinceLastAnnounce()
The time since the last announce
|
Torrent |
getTorrent()
Gets the associated torrent
|
void |
setEvent(TrackerEvent event)
Sets the current event for this
Torrent |
void |
setInfo(int seeders,
int leechers)
Updates the seeder and leecher counts.
|
void |
setInfo(int seeders,
int leechers,
int downloadCount)
Updates the seeder, leecher and completed downloads count.
|
public void setEvent(TrackerEvent event)
Torrentevent - The event.public void setInfo(int seeders,
int leechers)
ITracker.announce(Torrent) request and therefor updates lastAnnounceTimeseeders - The amount of seeders in the swarmleechers - The amount of leechers in the swarm.public void setInfo(int seeders,
int leechers,
int downloadCount)
seeders - The amount of seeders in the swarmleechers - The amount of leechers in the swarm.downloadCount - The amount of times this torrent has been downloaded.public TrackerEvent getEvent()
Torrentpublic int getSeeders()
public int getLeechers()
public String getDownloadCount()
public Duration getTimeSinceLastAnnounce()
public Torrent getTorrent()
Copyright © 2016. All rights reserved.