NETVIRT-1630 migrate to md-sal APIs
[netvirt.git] / elanmanager / impl / src / main / java / org / opendaylight / netvirt / elan / l2gw / ha / handlers / ConfigNodeUpdatedHandler.java
index 2c925321cdd5ec744b0977e0f7d72ee8ae1a51fd..f8b7dd1e1f168257075936c1504b1059508db79a 100644 (file)
@@ -7,8 +7,9 @@
  */
 package org.opendaylight.netvirt.elan.l2gw.ha.handlers;
 
-import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
-import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
+import org.opendaylight.genius.infra.Datastore.Configuration;
+import org.opendaylight.genius.infra.TypedReadWriteTransaction;
+import org.opendaylight.mdsal.binding.api.DataObjectModification;
 import org.opendaylight.netvirt.elan.l2gw.ha.merge.GlobalAugmentationMerger;
 import org.opendaylight.netvirt.elan.l2gw.ha.merge.GlobalNodeMerger;
 import org.opendaylight.netvirt.elan.l2gw.ha.merge.PSAugmentationMerger;
@@ -27,17 +28,13 @@ public class ConfigNodeUpdatedHandler {
     /**
      * Copy updated data from HA node to child node of config data tree.
      *
-     * @param haUpdated HA node updated
-     * @param haOriginal HA node original
      * @param haChildNodeId HA child node which needs to be updated
      * @param mod the data object modification
      * @param tx Transaction
      */
-    public void copyHAGlobalUpdateToChild(Node haUpdated,
-                                          Node haOriginal,
-                                          InstanceIdentifier<Node> haChildNodeId,
+    public void copyHAGlobalUpdateToChild(InstanceIdentifier<Node> haChildNodeId,
                                           DataObjectModification<Node> mod,
-                                          ReadWriteTransaction tx) {
+                                          TypedReadWriteTransaction<Configuration> tx) {
         globalAugmentationMerger.mergeConfigUpdate(haChildNodeId,
                 mod.getModifiedAugmentation(HwvtepGlobalAugmentation.class), tx);
         globalNodeMerger.mergeConfigUpdate(haChildNodeId, mod, tx);
@@ -46,17 +43,13 @@ public class ConfigNodeUpdatedHandler {
     /**
      * Copy HA ps node update to HA child ps node of config data tree.
      *
-     * @param haUpdated HA node updated
-     * @param haOriginal HA node original
      * @param haChildNodeId HA child node which needs to be updated
      * @param mod the data object modification
      * @param tx Transaction
      */
-    public void copyHAPSUpdateToChild(Node haUpdated,
-                                      Node haOriginal,
-                                      InstanceIdentifier<Node> haChildNodeId,
+    public void copyHAPSUpdateToChild(InstanceIdentifier<Node> haChildNodeId,
                                       DataObjectModification<Node> mod,
-                                      ReadWriteTransaction tx) {
+                                      TypedReadWriteTransaction<Configuration> tx) {
 
         psAugmentationMerger.mergeConfigUpdate(haChildNodeId,
                 mod.getModifiedAugmentation(PhysicalSwitchAugmentation.class), tx);