Addressing review comments of patch-3
Addressing review comments of patch-2
Fixing javadoc warnings
Pushing changes for onos-5146 - Added 2 new APIs in DeviceService.java to get port specific PortStatistics by specifying Device ID & Port Number. Also implemented the APIs in SimpleDeviceStore etc. This will be a very useful API for app developers who are intersted to query port specific port statistics
Change-Id: I8f3e5a443eb5b50237a679999311b48609e54a44
diff --git a/core/api/src/main/java/org/onosproject/net/device/DeviceService.java b/core/api/src/main/java/org/onosproject/net/device/DeviceService.java
index e6cd2d7..ce988c5 100644
--- a/core/api/src/main/java/org/onosproject/net/device/DeviceService.java
+++ b/core/api/src/main/java/org/onosproject/net/device/DeviceService.java
@@ -113,6 +113,28 @@
List<PortStatistics> getPortDeltaStatistics(DeviceId deviceId);
/**
+ * Returns the port specific port statistics associated with the device and port.
+ *
+ * @param deviceId device identifier
+ * @param portNumber port identifier
+ * @return port statistics of specified port
+ */
+ default PortStatistics getStatisticsForPort(DeviceId deviceId, PortNumber portNumber) {
+ return null;
+ }
+
+ /**
+ * Returns the port specific port delta statistics associated with the device and port.
+ *
+ * @param deviceId device identifier
+ * @param portNumber port identifier
+ * @return port delta statistics of specified port
+ */
+ default PortStatistics getDeltaStatisticsForPort(DeviceId deviceId, PortNumber portNumber) {
+ return null;
+ }
+
+ /**
* Returns the port with the specified number and hosted by the given device.
*
* @param deviceId device identifier