Class TRHostTorrentHostImpl
java.lang.Object
com.biglybt.core.tracker.host.impl.TRHostTorrentHostImpl
- All Implemented Interfaces:
TRHostTorrent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Average
private final Average
private final Average
private final Average
private final Average
private final Average
private HashMap
private long
private boolean
private final TRHostImpl
private long
private long
private long
private long
private long
private long
private List
private boolean
private boolean
private final int
private final List
private final TRTrackerServer
private TRTrackerServerTorrent
private long
private long
private long
private long
private long
private long
private long
private int
protected final AEMonitor
private TOTorrent
Fields inherited from interface com.biglybt.core.tracker.host.TRHostTorrent
TS_FAILED, TS_PUBLISHED, TS_STARTED, TS_STOPPED
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TRHostTorrentHostImpl
(TRHostImpl _host, TRTrackerServer _server, TOTorrent _torrent, int _port, long _date_added) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
boolean
doesn't guarantee that removal will be successful as conditions may changevoid
long
long
long
long
long
long
long
int
long
To retreive arbitrary objects against this object.long
int
getPeers()
int
getPort()
long
int
protected TRTrackerServer
protected TRTrackerServerTorrentStats
getStats()
int
long
long
long
long
long
boolean
boolean
boolean
protected void
protected void
void
remove()
void
void
void
To store arbitrary objects against this object.void
setPassive
(boolean b) protected void
setPersistent
(boolean _persistent) protected void
setStartOfDayValues
(long _date_added, long completed, long announces, long scrapes, long uploaded, long downloaded, long bytes_in, long bytes_out) void
setTorrent
(TOTorrent _torrent) protected void
setTorrentInternal
(TOTorrent _torrent) void
start()
protected void
void
stop()
protected void
protected 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:
getPort
in interfaceTRHostTorrent
-
start
public void start()- Specified by:
start
in interfaceTRHostTorrent
-
startSupport
protected void startSupport() -
stop
public void stop()- Specified by:
stop
in interfaceTRHostTorrent
-
stopSupport
protected void stopSupport() -
remove
- Specified by:
remove
in interfaceTRHostTorrent
- Throws:
TRHostTorrentRemovalVetoException
-
canBeRemoved
Description copied from interface:TRHostTorrent
doesn't guarantee that removal will be successful as conditions may change- Specified by:
canBeRemoved
in interfaceTRHostTorrent
- Returns:
- true if OK, exception thrown otherwise
- Throws:
TRHostTorrentRemovalVetoException
-
getStatus
public int getStatus()- Specified by:
getStatus
in interfaceTRHostTorrent
-
isPersistent
public boolean isPersistent()- Specified by:
isPersistent
in interfaceTRHostTorrent
-
setPersistent
protected void setPersistent(boolean _persistent) -
isPassive
public boolean isPassive()- Specified by:
isPassive
in interfaceTRHostTorrent
-
isExternal
public boolean isExternal()- Specified by:
isExternal
in interfaceTRHostTorrent
-
setPassive
public void setPassive(boolean b) - Specified by:
setPassive
in interfaceTRHostTorrent
-
getDateAdded
public long getDateAdded()- Specified by:
getDateAdded
in interfaceTRHostTorrent
-
getTorrent
- Specified by:
getTorrent
in interfaceTRHostTorrent
-
setTorrent
- Specified by:
setTorrent
in interfaceTRHostTorrent
-
setTorrentInternal
-
getTrackerTorrent
- Specified by:
getTrackerTorrent
in interfaceTRHostTorrent
-
getPeers
- Specified by:
getPeers
in 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:
getSeedCount
in interfaceTRHostTorrent
-
getLeecherCount
public int getLeecherCount()- Specified by:
getLeecherCount
in interfaceTRHostTorrent
-
getBadNATCount
public int getBadNATCount()- Specified by:
getBadNATCount
in interfaceTRHostTorrent
-
updateStats
protected void updateStats() -
getServer
-
getTotalUploaded
public long getTotalUploaded()- Specified by:
getTotalUploaded
in interfaceTRHostTorrent
-
getTotalDownloaded
public long getTotalDownloaded()- Specified by:
getTotalDownloaded
in interfaceTRHostTorrent
-
getTotalLeft
public long getTotalLeft()- Specified by:
getTotalLeft
in interfaceTRHostTorrent
-
getTotalBytesIn
public long getTotalBytesIn()- Specified by:
getTotalBytesIn
in interfaceTRHostTorrent
-
getTotalBytesOut
public long getTotalBytesOut()- Specified by:
getTotalBytesOut
in interfaceTRHostTorrent
-
getAnnounceCount
public long getAnnounceCount()- Specified by:
getAnnounceCount
in interfaceTRHostTorrent
-
getScrapeCount
public long getScrapeCount()- Specified by:
getScrapeCount
in interfaceTRHostTorrent
-
getCompletedCount
public long getCompletedCount()- Specified by:
getCompletedCount
in interfaceTRHostTorrent
-
getAverageBytesIn
public long getAverageBytesIn()- Specified by:
getAverageBytesIn
in interfaceTRHostTorrent
-
getAverageBytesOut
public long getAverageBytesOut()- Specified by:
getAverageBytesOut
in interfaceTRHostTorrent
-
getAverageUploaded
public long getAverageUploaded()- Specified by:
getAverageUploaded
in interfaceTRHostTorrent
-
getAverageDownloaded
public long getAverageDownloaded()- Specified by:
getAverageDownloaded
in interfaceTRHostTorrent
-
getAverageAnnounceCount
public long getAverageAnnounceCount()- Specified by:
getAverageAnnounceCount
in interfaceTRHostTorrent
-
getAverageScrapeCount
public long getAverageScrapeCount()- Specified by:
getAverageScrapeCount
in interfaceTRHostTorrent
-
disableReplyCaching
public void disableReplyCaching()- Specified by:
disableReplyCaching
in interfaceTRHostTorrent
-
preProcess
- Throws:
TRHostException
-
postProcess
- Throws:
TRHostException
-
addListener
- Specified by:
addListener
in interfaceTRHostTorrent
-
removeListener
- Specified by:
removeListener
in interfaceTRHostTorrent
-
addRemovalListener
- Specified by:
addRemovalListener
in interfaceTRHostTorrent
-
removeRemovalListener
- Specified by:
removeRemovalListener
in interfaceTRHostTorrent
-
getData
To retreive arbitrary objects against this object.- Specified by:
getData
in interfaceTRHostTorrent
-
setData
To store arbitrary objects against this object.- Specified by:
setData
in interfaceTRHostTorrent
-