public final class DefaultPortStatistics extends java.lang.Object implements PortStatistics
Modifier and Type | Class and Description |
---|---|
static class |
DefaultPortStatistics.Builder |
Modifier and Type | Method and Description |
---|---|
static DefaultPortStatistics.Builder |
builder()
Creates a builder for DefaultPortStatistics object.
|
long |
bytesReceived()
Returns the bytes received.
|
long |
bytesSent()
Returns the bytes sent.
|
long |
durationNano()
Returns the time port has been alive in nano seconds.
|
long |
durationSec()
Returns the time port has been alive in seconds.
|
boolean |
isZero()
Returns true if all the port stats are zero, excluding TxErrors and RxErrors.
|
long |
packetsReceived()
Returns the number of packets received.
|
long |
packetsRxDropped()
Returns the number of packets dropped by RX.
|
long |
packetsRxErrors()
Returns the number of transmit errors.
|
long |
packetsSent()
Returns the number of packets sent.
|
long |
packetsTxDropped()
Returns the number of packets dropped by TX.
|
long |
packetsTxErrors()
Returns the number of receive errors.
|
int |
port()
Returns the port number.
|
PortNumber |
portNumber()
Returns the port number.
|
java.lang.String |
toString() |
public static DefaultPortStatistics.Builder builder()
public int port()
PortStatistics
port
in interface PortStatistics
public PortNumber portNumber()
PortStatistics
portNumber
in interface PortStatistics
public long packetsReceived()
PortStatistics
packetsReceived
in interface PortStatistics
public long packetsSent()
PortStatistics
packetsSent
in interface PortStatistics
public long bytesReceived()
PortStatistics
bytesReceived
in interface PortStatistics
public long bytesSent()
PortStatistics
bytesSent
in interface PortStatistics
public long packetsRxDropped()
PortStatistics
packetsRxDropped
in interface PortStatistics
public long packetsTxDropped()
PortStatistics
packetsTxDropped
in interface PortStatistics
public long packetsRxErrors()
PortStatistics
packetsRxErrors
in interface PortStatistics
public long packetsTxErrors()
PortStatistics
packetsTxErrors
in interface PortStatistics
public long durationSec()
PortStatistics
durationSec
in interface PortStatistics
public long durationNano()
PortStatistics
durationNano
in interface PortStatistics
public boolean isZero()
PortStatistics
isZero
in interface PortStatistics
public java.lang.String toString()
toString
in class java.lang.Object