Package org.onosproject.net.device
Class DefaultPortStatistics.Builder
- java.lang.Object
-
- org.onosproject.net.device.DefaultPortStatistics.Builder
-
- Enclosing class:
- DefaultPortStatistics
public static final class DefaultPortStatistics.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultPortStatistics
build()
Creates a PortStatistics object.DefaultPortStatistics.Builder
setAnnotations(Annotations anns)
Sets the annotations.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(PortNumber portNumber)
Sets port number.
-
-
-
Method Detail
-
setPort
public DefaultPortStatistics.Builder setPort(PortNumber portNumber)
Sets port number.- Parameters:
portNumber
- port number- Returns:
- builder object
-
setDeviceId
public DefaultPortStatistics.Builder setDeviceId(DeviceId deviceId)
Sets the device identifier.- Parameters:
deviceId
- device identifier- Returns:
- builder object
-
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
-
setAnnotations
public DefaultPortStatistics.Builder setAnnotations(Annotations anns)
Sets the annotations.- Parameters:
anns
- annotations- Returns:
- builder object
-
build
public DefaultPortStatistics build()
Creates a PortStatistics object.- Returns:
- DefaultPortStatistics object
-
-