Class PEPeerControlImpl.MyPeerStats
java.lang.Object
com.biglybt.core.peer.impl.control.PEPeerControlImpl.MyPeerStats
- All Implemented Interfaces:
PEPeerStats
- Enclosing class:
- PEPeerControlImpl
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
bytesDiscarded
(int num_bytes) The given number of bytes received from the peer were discarded.void
dataBytesReceived
(int num_bytes) The given number of data (payload) bytes have been received from the peer.void
dataBytesSent
(int num_bytes) The given number of data (payload) bytes have been sent to the peer.void
diskReadComplete
(long bytes) Disk access stats methodsint
long
Get the the average bytes-per-second speed that we are receiving piece data from the peer.long
Get the the average bytes-per-second speed that we are sending piece data to the peer.int
long
Get the estimated total download rate of the peer.long
long
Get the estimated total upload rate of the peer.getPeer()
int
int
long
Get the the average bytes-per-second speed that we are receiving protocol messages from the peer.long
Get the the average bytes-per-second speed that we are sending protocol messages to the peer.long
Get the the longer-average bytes-per-second speed at which the peer is uploading data to us.long
Get the total number of discarded bytes received from the peer.long
Get the number of bytes downloaded in total by this peer (includes data downloaded from all other peers).long
Get the total number of data (payload) bytes received from the peer.long
Get the total number of data (payload) bytes sent to the peer.long
int
long
Get the total number of protocol (overhead) bytes received from the peer.long
Get the total number of protocol (overhead) bytes sent to the peer.int
void
hasNewPiece
(int piece_size) The peer has completed a piece of the given byte size.void
permittedReceiveBytesUsed
(int num) void
permittedSendBytesUsed
(int num) void
protocolBytesReceived
(int num_bytes) The given number of protocol (overhead) bytes have been received from the peer.void
protocolBytesSent
(int num_bytes) The given number of protocol (overhead) bytes have been sent to the peer.void
setDownloadRateLimitBytesPerSecond
(int bytes) void
void
setUploadRateLimitBytesPerSecond
(int bytes) void
statisticalSentPiece
(int piece_size) The peer has statistically sent a piecce of the given byte size.
-
Field Details
-
peer
-
-
Constructor Details
-
MyPeerStats
-
-
Method Details
-
getPeer
- Specified by:
getPeer
in interfacePEPeerStats
-
setPeer
- Specified by:
setPeer
in interfacePEPeerStats
-
dataBytesSent
public void dataBytesSent(int num_bytes) Description copied from interface:PEPeerStats
The given number of data (payload) bytes have been sent to the peer.- Specified by:
dataBytesSent
in interfacePEPeerStats
-
protocolBytesSent
public void protocolBytesSent(int num_bytes) Description copied from interface:PEPeerStats
The given number of protocol (overhead) bytes have been sent to the peer.- Specified by:
protocolBytesSent
in interfacePEPeerStats
-
dataBytesReceived
public void dataBytesReceived(int num_bytes) Description copied from interface:PEPeerStats
The given number of data (payload) bytes have been received from the peer.- Specified by:
dataBytesReceived
in interfacePEPeerStats
-
protocolBytesReceived
public void protocolBytesReceived(int num_bytes) Description copied from interface:PEPeerStats
The given number of protocol (overhead) bytes have been received from the peer.- Specified by:
protocolBytesReceived
in interfacePEPeerStats
-
bytesDiscarded
public void bytesDiscarded(int num_bytes) Description copied from interface:PEPeerStats
The given number of bytes received from the peer were discarded.- Specified by:
bytesDiscarded
in interfacePEPeerStats
-
hasNewPiece
public void hasNewPiece(int piece_size) Description copied from interface:PEPeerStats
The peer has completed a piece of the given byte size.- Specified by:
hasNewPiece
in interfacePEPeerStats
-
statisticalSentPiece
public void statisticalSentPiece(int piece_size) Description copied from interface:PEPeerStats
The peer has statistically sent a piecce of the given byte size.- Specified by:
statisticalSentPiece
in interfacePEPeerStats
-
getDataReceiveRate
public long getDataReceiveRate()Description copied from interface:PEPeerStats
Get the the average bytes-per-second speed that we are receiving piece data from the peer.- Specified by:
getDataReceiveRate
in interfacePEPeerStats
- Returns:
- average speed.
-
getProtocolReceiveRate
public long getProtocolReceiveRate()Description copied from interface:PEPeerStats
Get the the average bytes-per-second speed that we are receiving protocol messages from the peer.- Specified by:
getProtocolReceiveRate
in interfacePEPeerStats
- Returns:
- average speed.
-
getTotalDataBytesReceived
public long getTotalDataBytesReceived()Description copied from interface:PEPeerStats
Get the total number of data (payload) bytes received from the peer.- Specified by:
getTotalDataBytesReceived
in interfacePEPeerStats
- Returns:
- total
-
getTotalProtocolBytesReceived
public long getTotalProtocolBytesReceived()Description copied from interface:PEPeerStats
Get the total number of protocol (overhead) bytes received from the peer.- Specified by:
getTotalProtocolBytesReceived
in interfacePEPeerStats
- Returns:
- total
-
getDataSendRate
public long getDataSendRate()Description copied from interface:PEPeerStats
Get the the average bytes-per-second speed that we are sending piece data to the peer.- Specified by:
getDataSendRate
in interfacePEPeerStats
- Returns:
- average speed.
-
getProtocolSendRate
public long getProtocolSendRate()Description copied from interface:PEPeerStats
Get the the average bytes-per-second speed that we are sending protocol messages to the peer.- Specified by:
getProtocolSendRate
in interfacePEPeerStats
- Returns:
- average speed.
-
getTotalDataBytesSent
public long getTotalDataBytesSent()Description copied from interface:PEPeerStats
Get the total number of data (payload) bytes sent to the peer.- Specified by:
getTotalDataBytesSent
in interfacePEPeerStats
- Returns:
- total
-
getTotalProtocolBytesSent
public long getTotalProtocolBytesSent()Description copied from interface:PEPeerStats
Get the total number of protocol (overhead) bytes sent to the peer.- Specified by:
getTotalProtocolBytesSent
in interfacePEPeerStats
- Returns:
- total
-
getSmoothDataReceiveRate
public long getSmoothDataReceiveRate()Description copied from interface:PEPeerStats
Get the the longer-average bytes-per-second speed at which the peer is uploading data to us.- Specified by:
getSmoothDataReceiveRate
in interfacePEPeerStats
- Returns:
- average speed
-
getTotalBytesDiscarded
public long getTotalBytesDiscarded()Description copied from interface:PEPeerStats
Get the total number of discarded bytes received from the peer.- Specified by:
getTotalBytesDiscarded
in interfacePEPeerStats
- Returns:
- total discarded
-
getEstimatedDownloadRateOfPeer
public long getEstimatedDownloadRateOfPeer()Description copied from interface:PEPeerStats
Get the estimated total download rate of the peer.- Specified by:
getEstimatedDownloadRateOfPeer
in interfacePEPeerStats
- Returns:
- estimated rate in bytes-per-second
-
getEstimatedUploadRateOfPeer
public long getEstimatedUploadRateOfPeer()Description copied from interface:PEPeerStats
Get the estimated total upload rate of the peer.- Specified by:
getEstimatedUploadRateOfPeer
in interfacePEPeerStats
- Returns:
- estimated rate in bytes-per-second
-
getEstimatedSecondsToCompletion
public long getEstimatedSecondsToCompletion()- Specified by:
getEstimatedSecondsToCompletion
in interfacePEPeerStats
-
getTotalBytesDownloadedByPeer
public long getTotalBytesDownloadedByPeer()Description copied from interface:PEPeerStats
Get the number of bytes downloaded in total by this peer (includes data downloaded from all other peers).- Specified by:
getTotalBytesDownloadedByPeer
in interfacePEPeerStats
- Returns:
- total download bytes done
-
diskReadComplete
public void diskReadComplete(long bytes) Description copied from interface:PEPeerStats
Disk access stats methods- Specified by:
diskReadComplete
in interfacePEPeerStats
-
getTotalDiskReadCount
public int getTotalDiskReadCount()- Specified by:
getTotalDiskReadCount
in interfacePEPeerStats
-
getAggregatedDiskReadCount
public int getAggregatedDiskReadCount()- Specified by:
getAggregatedDiskReadCount
in interfacePEPeerStats
-
getTotalDiskReadBytes
public long getTotalDiskReadBytes()- Specified by:
getTotalDiskReadBytes
in interfacePEPeerStats
-
setUploadRateLimitBytesPerSecond
public void setUploadRateLimitBytesPerSecond(int bytes) - Specified by:
setUploadRateLimitBytesPerSecond
in interfacePEPeerStats
-
setDownloadRateLimitBytesPerSecond
public void setDownloadRateLimitBytesPerSecond(int bytes) - Specified by:
setDownloadRateLimitBytesPerSecond
in interfacePEPeerStats
-
getUploadRateLimitBytesPerSecond
public int getUploadRateLimitBytesPerSecond()- Specified by:
getUploadRateLimitBytesPerSecond
in interfacePEPeerStats
-
getDownloadRateLimitBytesPerSecond
public int getDownloadRateLimitBytesPerSecond()- Specified by:
getDownloadRateLimitBytesPerSecond
in interfacePEPeerStats
-
getPermittedBytesToSend
public int getPermittedBytesToSend()- Specified by:
getPermittedBytesToSend
in interfacePEPeerStats
-
permittedSendBytesUsed
public void permittedSendBytesUsed(int num) - Specified by:
permittedSendBytesUsed
in interfacePEPeerStats
-
getPermittedBytesToReceive
public int getPermittedBytesToReceive()- Specified by:
getPermittedBytesToReceive
in interfacePEPeerStats
-
permittedReceiveBytesUsed
public void permittedReceiveBytesUsed(int num) - Specified by:
permittedReceiveBytesUsed
in interfacePEPeerStats
-