public static final class DefaultPortStatistics.Builder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
DefaultPortStatistics |
build()
Creates a PortStatistics object.
|
DefaultPortStatistics.Builder |
setBytesReceived(long bytes)
Sets the number of received bytes.
|
DefaultPortStatistics.Builder |
setBytesSent(long bytes)
Sets the number of sent bytes.
|
DefaultPortStatistics.Builder |
setDeviceId(DeviceId deviceId)
Sets the device identifier.
|
DefaultPortStatistics.Builder |
setDurationNano(long nano)
Sets the time port has been alive in nano seconds.
|
DefaultPortStatistics.Builder |
setDurationSec(long sec)
Sets the time port has been alive in seconds.
|
DefaultPortStatistics.Builder |
setPacketsReceived(long packets)
Sets the number of packet received.
|
DefaultPortStatistics.Builder |
setPacketsRxDropped(long packets)
Sets the number of packets dropped by RX.
|
DefaultPortStatistics.Builder |
setPacketsRxErrors(long packets)
Sets the number of receive errors.
|
DefaultPortStatistics.Builder |
setPacketsSent(long packets)
Sets the number of packets sent.
|
DefaultPortStatistics.Builder |
setPacketsTxDropped(long packets)
Sets the number of packets dropped by TX.
|
DefaultPortStatistics.Builder |
setPacketsTxErrors(long packets)
Sets the number of transmit errors.
|
DefaultPortStatistics.Builder |
setPort(int port)
Deprecated.
ONOS 1.12 Magpie
|
DefaultPortStatistics.Builder |
setPort(PortNumber portNumber)
Sets port number.
|
@Deprecated public DefaultPortStatistics.Builder setPort(int port)
port
- port numberpublic DefaultPortStatistics.Builder setPort(PortNumber portNumber)
portNumber
- port numberpublic DefaultPortStatistics.Builder setDeviceId(DeviceId deviceId)
deviceId
- device identifierpublic DefaultPortStatistics.Builder setPacketsReceived(long packets)
packets
- number of packets receivedpublic DefaultPortStatistics.Builder setPacketsSent(long packets)
packets
- number of packets sentpublic DefaultPortStatistics.Builder setBytesReceived(long bytes)
bytes
- number of received bytes.public DefaultPortStatistics.Builder setBytesSent(long bytes)
bytes
- number of sent bytespublic DefaultPortStatistics.Builder setPacketsRxDropped(long packets)
packets
- number of packets dropped by RXpublic DefaultPortStatistics.Builder setPacketsTxDropped(long packets)
packets
- number of packetspublic DefaultPortStatistics.Builder setPacketsRxErrors(long packets)
packets
- number of receive errorspublic DefaultPortStatistics.Builder setPacketsTxErrors(long packets)
packets
- number of transmit errorspublic DefaultPortStatistics.Builder setDurationSec(long sec)
sec
- time port has been alive in secondspublic DefaultPortStatistics.Builder setDurationNano(long nano)
nano
- time port has been alive in nano secondspublic DefaultPortStatistics build()