*/
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;
/**
* 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);
/**
* 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);