Class DefaultPortStatistics

    • Method Detail

      • builder

        public static DefaultPortStatistics.Builder builder()
        Creates a builder for DefaultPortStatistics object.
        Returns:
        builder object for DefaultPortStatistics object
      • packetsReceived

        public long packetsReceived()
        Description copied from interface: PortStatistics
        Returns the number of packets received.
        Specified by:
        packetsReceived in interface PortStatistics
        Returns:
        the number of packets received
      • packetsSent

        public long packetsSent()
        Description copied from interface: PortStatistics
        Returns the number of packets sent.
        Specified by:
        packetsSent in interface PortStatistics
        Returns:
        the number of packets sent
      • bytesReceived

        public long bytesReceived()
        Description copied from interface: PortStatistics
        Returns the bytes received.
        Specified by:
        bytesReceived in interface PortStatistics
        Returns:
        the bytes received
      • bytesSent

        public long bytesSent()
        Description copied from interface: PortStatistics
        Returns the bytes sent.
        Specified by:
        bytesSent in interface PortStatistics
        Returns:
        the bytes sent
      • packetsRxDropped

        public long packetsRxDropped()
        Description copied from interface: PortStatistics
        Returns the number of packets dropped by RX.
        Specified by:
        packetsRxDropped in interface PortStatistics
        Returns:
        the number of packets dropped by RX
      • packetsTxDropped

        public long packetsTxDropped()
        Description copied from interface: PortStatistics
        Returns the number of packets dropped by TX.
        Specified by:
        packetsTxDropped in interface PortStatistics
        Returns:
        the number of packets dropped by TX
      • packetsRxErrors

        public long packetsRxErrors()
        Description copied from interface: PortStatistics
        Returns the number of transmit errors.
        Specified by:
        packetsRxErrors in interface PortStatistics
        Returns:
        the number of transmit errors
      • packetsTxErrors

        public long packetsTxErrors()
        Description copied from interface: PortStatistics
        Returns the number of receive errors.
        Specified by:
        packetsTxErrors in interface PortStatistics
        Returns:
        the number of receive error
      • durationSec

        public long durationSec()
        Description copied from interface: PortStatistics
        Returns the time port has been alive in seconds.
        Specified by:
        durationSec in interface PortStatistics
        Returns:
        the time port has been alive in seconds
      • durationNano

        public long durationNano()
        Description copied from interface: PortStatistics
        Returns the time port has been alive in nano seconds.
        Specified by:
        durationNano in interface PortStatistics
        Returns:
        the time port has been alive in nano seconds
      • isZero

        public boolean isZero()
        Description copied from interface: PortStatistics
        Returns true if all the port stats are zero, excluding TxErrors and RxErrors.
        Specified by:
        isZero in interface PortStatistics
        Returns:
        boolean true if all port stats are zero
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object