Class PEPeerControlImpl.MyPeerStats

java.lang.Object
com.biglybt.core.peer.impl.control.PEPeerControlImpl.MyPeerStats
All Implemented Interfaces:
PEPeerStats
Enclosing class:
PEPeerControlImpl

private class PEPeerControlImpl.MyPeerStats extends Object implements PEPeerStats
  • Field Details

    • peer

      private final PEPeer peer
  • Constructor Details

    • MyPeerStats

      private MyPeerStats(PEPeer _peer)
  • Method Details

    • getPeer

      public PEPeer getPeer()
      Specified by:
      getPeer in interface PEPeerStats
    • setPeer

      public void setPeer(PEPeer p)
      Specified by:
      setPeer in interface PEPeerStats
    • 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 interface PEPeerStats
    • 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 interface PEPeerStats
    • 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 interface PEPeerStats
    • 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 interface PEPeerStats
    • 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 interface PEPeerStats
    • 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 interface PEPeerStats
    • 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 interface PEPeerStats
    • 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 interface PEPeerStats
      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 interface PEPeerStats
      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 interface PEPeerStats
      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 interface PEPeerStats
      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 interface PEPeerStats
      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 interface PEPeerStats
      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 interface PEPeerStats
      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 interface PEPeerStats
      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 interface PEPeerStats
      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 interface PEPeerStats
      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 interface PEPeerStats
      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 interface PEPeerStats
      Returns:
      estimated rate in bytes-per-second
    • getEstimatedSecondsToCompletion

      public long getEstimatedSecondsToCompletion()
      Specified by:
      getEstimatedSecondsToCompletion in interface PEPeerStats
    • 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 interface PEPeerStats
      Returns:
      total download bytes done
    • diskReadComplete

      public void diskReadComplete(long bytes)
      Description copied from interface: PEPeerStats
      Disk access stats methods
      Specified by:
      diskReadComplete in interface PEPeerStats
    • getTotalDiskReadCount

      public int getTotalDiskReadCount()
      Specified by:
      getTotalDiskReadCount in interface PEPeerStats
    • getAggregatedDiskReadCount

      public int getAggregatedDiskReadCount()
      Specified by:
      getAggregatedDiskReadCount in interface PEPeerStats
    • getTotalDiskReadBytes

      public long getTotalDiskReadBytes()
      Specified by:
      getTotalDiskReadBytes in interface PEPeerStats
    • setUploadRateLimitBytesPerSecond

      public void setUploadRateLimitBytesPerSecond(int bytes)
      Specified by:
      setUploadRateLimitBytesPerSecond in interface PEPeerStats
    • setDownloadRateLimitBytesPerSecond

      public void setDownloadRateLimitBytesPerSecond(int bytes)
      Specified by:
      setDownloadRateLimitBytesPerSecond in interface PEPeerStats
    • getUploadRateLimitBytesPerSecond

      public int getUploadRateLimitBytesPerSecond()
      Specified by:
      getUploadRateLimitBytesPerSecond in interface PEPeerStats
    • getDownloadRateLimitBytesPerSecond

      public int getDownloadRateLimitBytesPerSecond()
      Specified by:
      getDownloadRateLimitBytesPerSecond in interface PEPeerStats
    • getPermittedBytesToSend

      public int getPermittedBytesToSend()
      Specified by:
      getPermittedBytesToSend in interface PEPeerStats
    • permittedSendBytesUsed

      public void permittedSendBytesUsed(int num)
      Specified by:
      permittedSendBytesUsed in interface PEPeerStats
    • getPermittedBytesToReceive

      public int getPermittedBytesToReceive()
      Specified by:
      getPermittedBytesToReceive in interface PEPeerStats
    • permittedReceiveBytesUsed

      public void permittedReceiveBytesUsed(int num)
      Specified by:
      permittedReceiveBytesUsed in interface PEPeerStats