Switch to MD-SAL APIs
[openflowplugin.git] / applications / notification-supplier / src / main / java / org / opendaylight / openflowplugin / applications / notification / supplier / impl / item / stat / QueueStatNotificationSupplierImpl.java
index b5295298a6814f2f364bf1f16c85251f3bbea93f..28281a1e4494904efe60fe780c335b90d4463234 100644 (file)
@@ -5,13 +5,12 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item.stat;
 
 import com.google.common.base.Preconditions;
 import java.util.Collections;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
+import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.NotificationPublishService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.queues.Queue;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
@@ -38,10 +37,10 @@ public class QueueStatNotificationSupplierImpl extends
     /**
      * Constructor register supplier as DataTreeChangeListener and create wildCarded InstanceIdentifier.
      *
-     * @param notifProviderService - {@link NotificationProviderService}
+     * @param notifProviderService - {@link NotificationPublishService}
      * @param db                   - {@link DataBroker}
      */
-    public QueueStatNotificationSupplierImpl(final NotificationProviderService notifProviderService,
+    public QueueStatNotificationSupplierImpl(final NotificationPublishService notifProviderService,
                                              final DataBroker db) {
         super(notifProviderService, db, FlowCapableNodeConnectorQueueStatisticsData.class);
     }
@@ -59,9 +58,9 @@ public class QueueStatNotificationSupplierImpl extends
         Preconditions.checkArgument(path != null);
 
         final NodeConnectorBuilder connBuilder = new NodeConnectorBuilder();
-        final NodeConnectorKey key = path.firstKeyOf(NodeConnector.class, NodeConnectorKey.class);
+        final NodeConnectorKey key = path.firstKeyOf(NodeConnector.class);
         connBuilder.setId(key.getId());
-        connBuilder.setKey(key);
+        connBuilder.withKey(key);
 
         final QueueIdAndStatisticsMapBuilder queueStatMapBuilder = new QueueIdAndStatisticsMapBuilder(
                 statisticsDataTreeItem.getFlowCapableNodeConnectorQueueStatistics());