Class TRHostTorrentHostImpl
java.lang.Object
com.biglybt.core.tracker.host.impl.TRHostTorrentHostImpl
- All Implemented Interfaces:
TRHostTorrent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Averageprivate final Averageprivate final Averageprivate final Averageprivate final Averageprivate final Averageprivate HashMapprivate longprivate booleanprivate final TRHostImplprivate longprivate longprivate longprivate longprivate longprivate longprivate Listprivate booleanprivate booleanprivate final intprivate final Listprivate final TRTrackerServerprivate TRTrackerServerTorrentprivate longprivate longprivate longprivate longprivate longprivate longprivate longprivate intprotected final AEMonitorprivate TOTorrentFields inherited from interface TRHostTorrent
TS_FAILED, TS_PUBLISHED, TS_STARTED, TS_STOPPED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTRHostTorrentHostImpl(TRHostImpl _host, TRTrackerServer _server, TOTorrent _torrent, int _port, long _date_added) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbooleandoesn't guarantee that removal will be successful as conditions may changevoidlonglonglonglonglonglonglongintlongTo retreive arbitrary objects against this object.longintgetPeers()intgetPort()longintprotected TRTrackerServerprotected TRTrackerServerTorrentStatsgetStats()intlonglonglonglonglongprotected booleanisDead(long now) booleanbooleanbooleanprotected voidprotected voidvoidremove()voidvoidvoidTo store arbitrary objects against this object.voidsetPassive(boolean b) protected voidsetPersistent(boolean _persistent) protected voidsetStartOfDayValues(long _date_added, long completed, long announces, long scrapes, long uploaded, long downloaded, long bytes_in, long bytes_out) voidsetTorrent(TOTorrent _torrent) protected voidsetTorrentInternal(TOTorrent _torrent) voidstart()protected voidvoidstop()protected voidprotected void
-
Field Details
-
host
-
server
-
server_torrent
-
torrent
-
date_added
private long date_added -
port
private final int port -
listeners_cow
-
removal_listeners
-
status
private int status -
persistent
private boolean persistent -
passive
private boolean passive -
sos_uploaded
private long sos_uploaded -
sos_downloaded
private long sos_downloaded -
sos_bytes_in
private long sos_bytes_in -
sos_bytes_out
private long sos_bytes_out -
sos_announce
private long sos_announce -
sos_scrape
private long sos_scrape -
sos_complete
private long sos_complete -
last_uploaded
private long last_uploaded -
last_downloaded
private long last_downloaded -
last_bytes_in
private long last_bytes_in -
last_bytes_out
private long last_bytes_out -
last_announce
private long last_announce -
last_scrape
private long last_scrape -
average_uploaded
-
average_downloaded
-
average_bytes_in
-
average_bytes_out
-
average_announce
-
average_scrape
-
disable_reply_caching
private boolean disable_reply_caching -
data
-
this_mon
-
-
Constructor Details
-
TRHostTorrentHostImpl
protected TRHostTorrentHostImpl(TRHostImpl _host, TRTrackerServer _server, TOTorrent _torrent, int _port, long _date_added)
-
-
Method Details
-
getPort
public int getPort()- Specified by:
getPortin interfaceTRHostTorrent
-
start
public void start()- Specified by:
startin interfaceTRHostTorrent
-
startSupport
protected void startSupport() -
stop
public void stop()- Specified by:
stopin interfaceTRHostTorrent
-
stopSupport
protected void stopSupport() -
remove
- Specified by:
removein interfaceTRHostTorrent- Throws:
TRHostTorrentRemovalVetoException
-
canBeRemoved
Description copied from interface:TRHostTorrentdoesn't guarantee that removal will be successful as conditions may change- Specified by:
canBeRemovedin interfaceTRHostTorrent- Returns:
- true if OK, exception thrown otherwise
- Throws:
TRHostTorrentRemovalVetoException
-
getStatus
public int getStatus()- Specified by:
getStatusin interfaceTRHostTorrent
-
isPersistent
public boolean isPersistent()- Specified by:
isPersistentin interfaceTRHostTorrent
-
setPersistent
protected void setPersistent(boolean _persistent) -
isPassive
public boolean isPassive()- Specified by:
isPassivein interfaceTRHostTorrent
-
isExternal
public boolean isExternal()- Specified by:
isExternalin interfaceTRHostTorrent
-
isDead
protected boolean isDead(long now) -
setPassive
public void setPassive(boolean b) - Specified by:
setPassivein interfaceTRHostTorrent
-
getDateAdded
public long getDateAdded()- Specified by:
getDateAddedin interfaceTRHostTorrent
-
getTorrent
- Specified by:
getTorrentin interfaceTRHostTorrent
-
setTorrent
- Specified by:
setTorrentin interfaceTRHostTorrent
-
setTorrentInternal
-
getTrackerTorrent
- Specified by:
getTrackerTorrentin interfaceTRHostTorrent
-
getPeers
- Specified by:
getPeersin interfaceTRHostTorrent
-
getStats
-
setStartOfDayValues
protected void setStartOfDayValues(long _date_added, long completed, long announces, long scrapes, long uploaded, long downloaded, long bytes_in, long bytes_out) -
getSeedCount
public int getSeedCount()- Specified by:
getSeedCountin interfaceTRHostTorrent
-
getLeecherCount
public int getLeecherCount()- Specified by:
getLeecherCountin interfaceTRHostTorrent
-
getBadNATCount
public int getBadNATCount()- Specified by:
getBadNATCountin interfaceTRHostTorrent
-
updateStats
protected void updateStats() -
getServer
-
getTotalUploaded
public long getTotalUploaded()- Specified by:
getTotalUploadedin interfaceTRHostTorrent
-
getTotalDownloaded
public long getTotalDownloaded()- Specified by:
getTotalDownloadedin interfaceTRHostTorrent
-
getTotalLeft
public long getTotalLeft()- Specified by:
getTotalLeftin interfaceTRHostTorrent
-
getTotalBytesIn
public long getTotalBytesIn()- Specified by:
getTotalBytesInin interfaceTRHostTorrent
-
getTotalBytesOut
public long getTotalBytesOut()- Specified by:
getTotalBytesOutin interfaceTRHostTorrent
-
getAnnounceCount
public long getAnnounceCount()- Specified by:
getAnnounceCountin interfaceTRHostTorrent
-
getScrapeCount
public long getScrapeCount()- Specified by:
getScrapeCountin interfaceTRHostTorrent
-
getCompletedCount
public long getCompletedCount()- Specified by:
getCompletedCountin interfaceTRHostTorrent
-
getAverageBytesIn
public long getAverageBytesIn()- Specified by:
getAverageBytesInin interfaceTRHostTorrent
-
getAverageBytesOut
public long getAverageBytesOut()- Specified by:
getAverageBytesOutin interfaceTRHostTorrent
-
getAverageUploaded
public long getAverageUploaded()- Specified by:
getAverageUploadedin interfaceTRHostTorrent
-
getAverageDownloaded
public long getAverageDownloaded()- Specified by:
getAverageDownloadedin interfaceTRHostTorrent
-
getAverageAnnounceCount
public long getAverageAnnounceCount()- Specified by:
getAverageAnnounceCountin interfaceTRHostTorrent
-
getAverageScrapeCount
public long getAverageScrapeCount()- Specified by:
getAverageScrapeCountin interfaceTRHostTorrent
-
disableReplyCaching
public void disableReplyCaching()- Specified by:
disableReplyCachingin interfaceTRHostTorrent
-
preProcess
- Throws:
TRHostException
-
postProcess
- Throws:
TRHostException
-
addListener
- Specified by:
addListenerin interfaceTRHostTorrent
-
removeListener
- Specified by:
removeListenerin interfaceTRHostTorrent
-
addRemovalListener
- Specified by:
addRemovalListenerin interfaceTRHostTorrent
-
removeRemovalListener
- Specified by:
removeRemovalListenerin interfaceTRHostTorrent
-
getData
To retreive arbitrary objects against this object.- Specified by:
getDatain interfaceTRHostTorrent
-
setData
To store arbitrary objects against this object.- Specified by:
setDatain interfaceTRHostTorrent
-