org.gudy.azureus2.plugins.peers
Interface PeerStats

All Known Implementing Classes:
PeerStatsImpl

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 getDownloadRateLimit()
           
 long getOverallBytesRemaining()
           
 int getPermittedBytesToReceive()
          For an external process receiving bytes on behalf of this peer this gives the current rate-limited number of bytes that can be received.
 int getPermittedBytesToSend()
          For an external process sending bytes on behalf of this peer this gives the current rate-limited number of bytes that can be sent.
 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.
 int getUploadRateLimit()
           
 void permittedReceiveBytesUsed(int bytes)
           
 void permittedSendBytesUsed(int bytes)
           
 void received(int bytes)
          The given number of data (payload) bytes have been sent to the peer.
 void sent(int bytes)
          The given number of data (payload) bytes have been received from the peer.
 void setDownloadRateLimit(int bytes_per_sec)
           
 void setUploadRateLimit(int bytes_per_sec)
           
 

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

getPermittedBytesToReceive

int getPermittedBytesToReceive()
For an external process receiving bytes on behalf of this peer this gives the current rate-limited number of bytes that can be received. Update with actual send using 'permittedReceiveBytesUsed' below.

Returns:
Since:
4.4.0.7

permittedReceiveBytesUsed

void permittedReceiveBytesUsed(int bytes)

getPermittedBytesToSend

int getPermittedBytesToSend()
For an external process sending bytes on behalf of this peer this gives the current rate-limited number of bytes that can be sent. Update with actual send using 'sent' below.

Returns:
Since:
4.4.0.7

permittedSendBytesUsed

void permittedSendBytesUsed(int bytes)

received

void received(int bytes)
The given number of data (payload) bytes have been sent to 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:
4.4.0.7

sent

void sent(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

setDownloadRateLimit

void setDownloadRateLimit(int bytes_per_sec)

getDownloadRateLimit

int getDownloadRateLimit()

setUploadRateLimit

void setUploadRateLimit(int bytes_per_sec)
Parameters:
bytes_per_sec -
Since:
4.7.0.1

getUploadRateLimit

int getUploadRateLimit()
Parameters:
bytes_per_sec -
Since:
4.7.0.1

getOverallBytesRemaining

long getOverallBytesRemaining()
Returns:
Since:
4.4.0.1