Switch to MD-SAL APIs
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / statistics / services / compatibility / QueueStatisticsToNotificationTransformer.java
index 1ba12e9d1cea5b63f31c60c15ab9bb474efb1497..160e9d345beddfda94d36264c9a021a64d74bd6e 100644 (file)
@@ -24,23 +24,24 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.queue._case.multipart.reply.queue.QueueStats;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.QueueStatisticsUpdate;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.QueueStatisticsUpdateBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.queue.id.and.statistics.map.QueueIdAndStatisticsMap;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.queue.id.and.statistics.map.QueueIdAndStatisticsMapBuilder;
 
 /**
- * pulled out queue stats to notification transformation
+ * Pulled out queue stats to notification transformation.
  */
-public class QueueStatisticsToNotificationTransformer {
+public final class QueueStatisticsToNotificationTransformer {
 
     private QueueStatisticsToNotificationTransformer() {
         // Hide implicit constructor
     }
 
     /**
+     * Transform statistics to notification.
+     *
      * @param mpReplyList   raw multipart response from device
-     * @param deviceInfo   device state
+     * @param deviceInfo    device state
      * @param ofVersion     device version
-     * @param emulatedTxId
+     * @param emulatedTxId  emulated transaction Id
      * @return notification containing flow stats
      */
     public static QueueStatisticsUpdate transformToNotification(final List<MultipartReply> mpReplyList,
@@ -53,7 +54,7 @@ public class QueueStatisticsToNotificationTransformer {
         notification.setMoreReplies(Boolean.FALSE);
         notification.setTransactionId(emulatedTxId);
 
-        notification.setQueueIdAndStatisticsMap(new ArrayList<QueueIdAndStatisticsMap>());
+        notification.setQueueIdAndStatisticsMap(new ArrayList<>());
         for (MultipartReply mpReply : mpReplyList) {
 
             MultipartReplyQueueCase caseBody = (MultipartReplyQueueCase) mpReply.getMultipartReplyBody();
@@ -83,6 +84,4 @@ public class QueueStatisticsToNotificationTransformer {
         }
         return notification.build();
     }
-
-
 }