Merge "OPNFLWPLUG-898 : remove deprecated checkedfuture"
[openflowplugin.git] / applications / topology-manager / src / main / java / org / opendaylight / openflowplugin / applications / topology / manager / FlowCapableTopologyExporter.java
index ce0f872fd1150d988c542a3a07007ecff628b806..176df705575e57a979844a074a8fb34dc6e59e59 100644 (file)
@@ -11,8 +11,8 @@ import static org.opendaylight.openflowplugin.applications.topology.manager.Flow
 
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
+import java.util.concurrent.ExecutionException;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
 import org.opendaylight.openflowplugin.common.txchain.TransactionChainManager;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.topology.discovery.rev130819.FlowTopologyDiscoveryListener;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.topology.discovery.rev130819.LinkDiscovered;
@@ -68,13 +68,13 @@ class FlowCapableTopologyExporter implements FlowTopologyDiscoveryListener {
                 try {
                     // read that checks if link exists (if we do not do this we might get an exception on delete)
                     linkOptional = manager.readFromTransaction(LogicalDatastoreType.OPERATIONAL,
-                            TopologyManagerUtil.linkPath(toTopologyLink(notification), iiToTopology)).checkedGet();
-                } catch (ReadFailedException e) {
+                            TopologyManagerUtil.linkPath(toTopologyLink(notification), iiToTopology)).get();
+                } catch (InterruptedException | ExecutionException e) {
                     LOG.warn("Error occurred when trying to read Link: {}", e.getMessage());
                     LOG.debug("Error occurred when trying to read Link.. ", e);
                 }
                 if (linkOptional.isPresent()) {
-                    manager.addDeleteOperationTotTxChain(LogicalDatastoreType.OPERATIONAL,
+                    manager.addDeleteOperationToTxChain(LogicalDatastoreType.OPERATIONAL,
                             TopologyManagerUtil.linkPath(toTopologyLink(notification), iiToTopology));
                 }
             }