NETVIRT-1630 migrate to md-sal APIs
[netvirt.git] / elanmanager / impl / src / main / java / org / opendaylight / netvirt / elan / l2gw / ha / handlers / ConfigNodeUpdatedHandler.java
index e019e588faadee39340a2975201cd7fdf07262ef..f8b7dd1e1f168257075936c1504b1059508db79a 100644 (file)
@@ -7,11 +7,9 @@
  */
 package org.opendaylight.netvirt.elan.l2gw.ha.handlers;
 
-import java.util.concurrent.ExecutionException;
-
-import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
-import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
+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;
@@ -30,21 +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
-     * @throws ReadFailedException  Exception thrown if read fails
-     * @throws ExecutionException  Exception thrown if Execution fail
-     * @throws InterruptedException Thread interrupted Exception
      */
-    public void copyHAGlobalUpdateToChild(Node haUpdated,
-                                          Node haOriginal,
-                                          InstanceIdentifier<Node> haChildNodeId,
+    public void copyHAGlobalUpdateToChild(InstanceIdentifier<Node> haChildNodeId,
                                           DataObjectModification<Node> mod,
-                                          ReadWriteTransaction tx)
-            throws InterruptedException, ExecutionException, ReadFailedException {
+                                          TypedReadWriteTransaction<Configuration> tx) {
         globalAugmentationMerger.mergeConfigUpdate(haChildNodeId,
                 mod.getModifiedAugmentation(HwvtepGlobalAugmentation.class), tx);
         globalNodeMerger.mergeConfigUpdate(haChildNodeId, mod, tx);
@@ -53,21 +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
-     * @throws ReadFailedException  Exception thrown if read fails
-     * @throws ExecutionException  Exception thrown if Execution fail
-     * @throws InterruptedException Thread interrupted Exception
      */
-    public void copyHAPSUpdateToChild(Node haUpdated,
-                                      Node haOriginal,
-                                      InstanceIdentifier<Node> haChildNodeId,
+    public void copyHAPSUpdateToChild(InstanceIdentifier<Node> haChildNodeId,
                                       DataObjectModification<Node> mod,
-                                      ReadWriteTransaction tx)
-            throws InterruptedException, ExecutionException, ReadFailedException {
+                                      TypedReadWriteTransaction<Configuration> tx) {
 
         psAugmentationMerger.mergeConfigUpdate(haChildNodeId,
                 mod.getModifiedAugmentation(PhysicalSwitchAugmentation.class), tx);