org.gudy.azureus2.plugins.peers
Interface PeerStats


public interface PeerStats

Statistical information for a Peer.


Method Summary
 void discarded(int bytes)
          The given number of bytes received from the peer were discarded.
 int getDownloadAverage()
          Get the the average bytes-per-second speed that we are receiving piece data from the peer.
 int getReception()
          Get the the longer-average bytes-per-second speed at which the peer is uploading data to us.
 int getStatisticSentAverage()
          Get the estimated total upload rate of the peer.
 long getTimeSinceConnectionEstablished()
          Get the amount of time that has elapsed since the connection with the peer has been established.
 int getTotalAverage()
          Get the estimated total download rate of the peer.
 long getTotalDiscarded()
          Get the total number of discarded bytes received from the peer.
 long getTotalReceived()
          Get the total number of data (payload) bytes received from the peer.
 long getTotalSent()
          Get the total number of data (payload) bytes sent to the peer.
 int getUploadAverage()
          Get the the average bytes-per-second speed that we are sending piece data to the peer.
 void received(int bytes)
          The given number of data (payload) bytes have been received from the peer.
 

Method Detail

getDownloadAverage

int getDownloadAverage()
Get the the average bytes-per-second speed that we are receiving piece data from the peer.

Returns:
average speed.
Since:
2.0.6.0

getReception

int getReception()
Get the the longer-average bytes-per-second speed at which the peer is uploading data to us.

Returns:
average speed
Since:
2.0.6.0

getUploadAverage

int getUploadAverage()
Get the the average bytes-per-second speed that we are sending piece data to the peer.

Returns:
average speed.
Since:
2.0.6.0

getTotalAverage

int getTotalAverage()
Get the estimated total download rate of the peer.

Returns:
estimated rate in bytes-per-second

getTotalDiscarded

long getTotalDiscarded()
Get the total number of discarded bytes received from the peer.

Returns:
total discarded
Since:
2.0.6.0

getTotalSent

long getTotalSent()
Get the total number of data (payload) bytes sent to the peer.

Returns:
total
Since:
2.0.6.0

getTotalReceived

long getTotalReceived()
Get the total number of data (payload) bytes received from the peer.

Returns:
total
Since:
2.0.6.0

getStatisticSentAverage

int getStatisticSentAverage()
Get the estimated total upload rate of the peer.

Returns:
estimated rate in bytes-per-second
Since:
2.0.6.0

received

void received(int bytes)
The given number of data (payload) bytes have been received from the peer. This number gets added to the total and is used to calculate the rate.

Use this if you are talking to the peer outside of Azureus' API, and want your stats added into Azureus'

Parameters:
bytes -
Since:
2.1.0.0

discarded

void discarded(int bytes)
The given number of bytes received from the peer were discarded. This number gets added to the total and is used to calculate rates that include disgarded inforamtion.

Use this if you are talking to the peer outside of Azureus' API, and want your stats added into Azureus'

Parameters:
bytes -
Since:
2.1.0.0

getTimeSinceConnectionEstablished

long getTimeSinceConnectionEstablished()
Get the amount of time that has elapsed since the connection with the peer has been established.

Returns:
Amount of time in ms.
Since:
2.4.0.0