Class DefaultPortStatistics.Builder

  • Enclosing class:
    DefaultPortStatistics

    public static final class DefaultPortStatistics.Builder
    extends java.lang.Object
    • Method Detail

      • setPacketsReceived

        public DefaultPortStatistics.Builder setPacketsReceived​(long packets)
        Sets the number of packet received.
        Parameters:
        packets - number of packets received
        Returns:
        builder object
      • setPacketsSent

        public DefaultPortStatistics.Builder setPacketsSent​(long packets)
        Sets the number of packets sent.
        Parameters:
        packets - number of packets sent
        Returns:
        builder object
      • setBytesReceived

        public DefaultPortStatistics.Builder setBytesReceived​(long bytes)
        Sets the number of received bytes.
        Parameters:
        bytes - number of received bytes.
        Returns:
        builder object
      • setBytesSent

        public DefaultPortStatistics.Builder setBytesSent​(long bytes)
        Sets the number of sent bytes.
        Parameters:
        bytes - number of sent bytes
        Returns:
        builder object
      • setPacketsRxDropped

        public DefaultPortStatistics.Builder setPacketsRxDropped​(long packets)
        Sets the number of packets dropped by RX.
        Parameters:
        packets - number of packets dropped by RX
        Returns:
        builder object
      • setPacketsTxDropped

        public DefaultPortStatistics.Builder setPacketsTxDropped​(long packets)
        Sets the number of packets dropped by TX.
        Parameters:
        packets - number of packets
        Returns:
        builder object
      • setPacketsRxErrors

        public DefaultPortStatistics.Builder setPacketsRxErrors​(long packets)
        Sets the number of receive errors.
        Parameters:
        packets - number of receive errors
        Returns:
        builder object
      • setPacketsTxErrors

        public DefaultPortStatistics.Builder setPacketsTxErrors​(long packets)
        Sets the number of transmit errors.
        Parameters:
        packets - number of transmit errors
        Returns:
        builder object
      • setDurationSec

        public DefaultPortStatistics.Builder setDurationSec​(long sec)
        Sets the time port has been alive in seconds.
        Parameters:
        sec - time port has been alive in seconds
        Returns:
        builder object
      • setDurationNano

        public DefaultPortStatistics.Builder setDurationNano​(long nano)
        Sets the time port has been alive in nano seconds.
        Parameters:
        nano - time port has been alive in nano seconds
        Returns:
        builder object
      • build

        public DefaultPortStatistics build()
        Creates a PortStatistics object.
        Returns:
        DefaultPortStatistics object