Package com.biglybt.pifimpl.local.peers
Class PeerManagerStatsImpl
- java.lang.Object
-
- com.biglybt.pifimpl.local.peers.PeerManagerStatsImpl
-
- All Implemented Interfaces:
PeerManagerStats
public class PeerManagerStatsImpl extends java.lang.Object implements PeerManagerStats
-
-
Field Summary
Fields Modifier and Type Field Description protected PEPeerManager
manager
protected PEPeerManagerStats
stats
-
Constructor Summary
Constructors Modifier Constructor Description protected
PeerManagerStatsImpl(PEPeerManager _manager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 interfacePeerManagerStats
-
getConnectedLeechers
public int getConnectedLeechers()
- Specified by:
getConnectedLeechers
in interfacePeerManagerStats
-
getDownloaded
public long getDownloaded()
- Specified by:
getDownloaded
in interfacePeerManagerStats
-
getUploaded
public long getUploaded()
- Specified by:
getUploaded
in interfacePeerManagerStats
-
getDownloadAverage
public long getDownloadAverage()
- Specified by:
getDownloadAverage
in interfacePeerManagerStats
-
getUploadAverage
public long getUploadAverage()
- Specified by:
getUploadAverage
in interfacePeerManagerStats
-
getDiscarded
public long getDiscarded()
- Specified by:
getDiscarded
in interfacePeerManagerStats
-
getHashFailBytes
public long getHashFailBytes()
- Specified by:
getHashFailBytes
in interfacePeerManagerStats
-
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 interfacePeerManagerStats
- 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 interfacePeerManagerStats
-
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 interfacePeerManagerStats
- 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 interfacePeerManagerStats
-
-