org.gudy.azureus2.pluginsimpl.local.peers
Class PeerManagerStatsImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.peers.PeerManagerStatsImpl
All Implemented Interfaces:
PeerManagerStats

public class PeerManagerStatsImpl
extends Object
implements PeerManagerStats


Field Summary
protected  PEPeerManager manager
           
protected  PEPeerManagerStats stats
           
 
Constructor Summary
protected PeerManagerStatsImpl(PEPeerManager _manager)
           
 
Method Summary
 int getConnectedLeechers()
           
 int getConnectedSeeds()
           
 long getDiscarded()
           
 long getDownloadAverage()
           
 long getDownloaded()
           
 long getHashFailBytes()
           
 int getPermittedBytesToReceive()
          For an external process receiving bytes on behalf of this download 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 download this gives the current rate-limited number of bytes that can be sent.
 long getUploadAverage()
           
 long getUploaded()
           
 void permittedReceiveBytesUsed(int bytes)
          The given number of data (payload) bytes have been received.
 void permittedSendBytesUsed(int bytes)
          The given number of data (payload) bytes have been sent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected PEPeerManager manager

stats

protected PEPeerManagerStats stats
Constructor Detail

PeerManagerStatsImpl

protected PeerManagerStatsImpl(PEPeerManager _manager)
Method Detail

getConnectedSeeds

public int getConnectedSeeds()
Specified by:
getConnectedSeeds in interface PeerManagerStats

getConnectedLeechers

public int getConnectedLeechers()
Specified by:
getConnectedLeechers in interface PeerManagerStats

getDownloaded

public long getDownloaded()
Specified by:
getDownloaded in interface PeerManagerStats

getUploaded

public long getUploaded()
Specified by:
getUploaded in interface PeerManagerStats

getDownloadAverage

public long getDownloadAverage()
Specified by:
getDownloadAverage in interface PeerManagerStats

getUploadAverage

public long getUploadAverage()
Specified by:
getUploadAverage in interface PeerManagerStats

getDiscarded

public long getDiscarded()
Specified by:
getDiscarded in interface PeerManagerStats

getHashFailBytes

public long getHashFailBytes()
Specified by:
getHashFailBytes in interface PeerManagerStats

getPermittedBytesToReceive

public int getPermittedBytesToReceive()
Description copied from interface: PeerManagerStats
For an external process receiving bytes on behalf of this download this gives the current rate-limited number of bytes that can be received. Update with actual send using 'received' below.

Specified by:
getPermittedBytesToReceive in interface PeerManagerStats
Returns:

permittedReceiveBytesUsed

public void permittedReceiveBytesUsed(int bytes)
Description copied from interface: PeerManagerStats
The given number of data (payload) bytes have been received. This number gets added to the total and is used to calculate the rate.

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

Specified by:
permittedReceiveBytesUsed in interface PeerManagerStats

getPermittedBytesToSend

public int getPermittedBytesToSend()
Description copied from interface: PeerManagerStats
For an external process sending bytes on behalf of this download this gives the current rate-limited number of bytes that can be sent. Update with actual send using 'sent' below.

Specified by:
getPermittedBytesToSend in interface PeerManagerStats
Returns:

permittedSendBytesUsed

public void permittedSendBytesUsed(int bytes)
Description copied from interface: PeerManagerStats
The given number of data (payload) bytes have been sent. This number gets added to the total and is used to calculate the rate.

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

Specified by:
permittedSendBytesUsed in interface PeerManagerStats