Class PEPeerControlImpl.MyPeerStats

    • Field Detail

      • peer

        private final PEPeer peer
    • Constructor Detail

      • MyPeerStats

        private MyPeerStats​(PEPeer _peer)
    • Method Detail

      • 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
      • 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