Migrate ListenableFutures.addErrorLogging() users 25/91625/6
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 24 Jul 2020 11:46:39 +0000 (13:46 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 4 Aug 2020 09:35:26 +0000 (11:35 +0200)
This method has a new place in LoggingFutures, use it from there.

Change-Id: I54d66f7c797ca88d8c5eed7d70c5f2ffeda3463e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
37 files changed:
dhcpservice/impl/src/main/java/org/opendaylight/netvirt/dhcpservice/DhcpExternalTunnelManager.java
dhcpservice/impl/src/main/java/org/opendaylight/netvirt/dhcpservice/DhcpSubnetListener.java
dhcpservice/impl/src/main/java/org/opendaylight/netvirt/dhcpservice/NodeListener.java
fibmanager/impl/src/main/java/org/opendaylight/netvirt/fibmanager/BaseVrfEntryHandler.java
fibmanager/impl/src/main/java/org/opendaylight/netvirt/fibmanager/BgpRouteVrfEntryHandler.java
fibmanager/impl/src/main/java/org/opendaylight/netvirt/fibmanager/VrfEntryListener.java
ipv6service/impl/src/main/java/org/opendaylight/netvirt/ipv6service/IfMgr.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/ha/SnatCentralizedSwitchChangeListener.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/ha/WeightedCentralizedSwitchScheduler.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/AbstractSnatService.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/EvpnDnatFlowProgrammer.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/EvpnSnatFlowProgrammer.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/FloatingIPListener.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NatRouterInterfaceListener.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NatUtil.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/RouterDpnChangeListener.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/SnatExternalRoutersListener.java
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/VpnFloatingIpHandler.java
neutronvpn/impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronPortChangeListener.java
neutronvpn/impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronSubnetGwMacResolver.java
neutronvpn/impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronvpnManager.java
neutronvpn/impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronvpnUtils.java
neutronvpn/impl/src/main/java/org/opendaylight/netvirt/neutronvpn/evpn/utils/NeutronEvpnUtils.java
qosservice/impl/src/main/java/org/opendaylight/netvirt/qosservice/QosAlertManager.java
qosservice/impl/src/main/java/org/opendaylight/netvirt/qosservice/QosPolicyChangeListener.java
statistics/impl/src/main/java/org/opendaylight/netvirt/statistics/StatisticsImpl.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/CentralizedSwitchChangeListener.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/FibEntriesListener.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/SubnetmapChangeListener.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnElanInterfaceChangeListener.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnInstanceListener.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnInterfaceManager.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnUtil.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/intervpnlink/IVpnLinkServiceImpl.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/intervpnlink/InterVpnLinkListener.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/iplearn/IpMonitorStopTask.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/populator/impl/L3vpnPopulator.java

index 810eece2e1b515b522a74432805662e8186fe53e..88d100ff1648e5eb3d6a19ad508fbda88a7420d6 100644 (file)
@@ -52,7 +52,7 @@ import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundConstants;
 import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils;
 import org.opendaylight.genius.utils.hwvtep.HwvtepUtils;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.ReadTransaction;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
@@ -362,7 +362,7 @@ public class DhcpExternalTunnelManager implements IDhcpExternalTunnelManager {
         }
         List<String> vmMacs = getAllVmMacs();
         LOG.trace("Installing drop actions to this new DPN {} VMs {}", dpId, vmMacs);
-        ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
+        LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
             for (String vmMacAddress : vmMacs) {
                 installDhcpDropAction(dpId, vmMacAddress, tx);
             }
@@ -448,7 +448,7 @@ public class DhcpExternalTunnelManager implements IDhcpExternalTunnelManager {
         if (setOfTunnelIpElanNamePairs == null || setOfTunnelIpElanNamePairs.isEmpty()) {
             LOG.trace("No tunnelIpElanName to handle for dpn {}. Returning", dpnId);
         } else {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
+            LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
                 if (!dpnId.equals(DhcpMConstants.INVALID_DPID)) {
                     List<String> listOfVms = getAllVmMacs();
                     for (String vmMacAddress : listOfVms) {
index c371cd0e89a2536509a6d3a5ede7e9333f1f805c..f08e49b63a1d36be53fd3040674c09e93979a6ff 100644 (file)
@@ -22,7 +22,7 @@ import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
 import org.opendaylight.genius.mdsalutil.MDSALUtil;
 import org.opendaylight.genius.mdsalutil.NwConstants;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.ReadTransaction;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
@@ -132,11 +132,11 @@ public class DhcpSubnetListener extends AbstractClusteredAsyncDataTreeChangeList
             //check whether any changes have happened
             LOG.trace("DhcpSubnetListener installNeutronPortEntries dpId: {} vmMacAddress : {}", dpId, vmMacAddress);
             //Bind the dhcp service when enabled
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
                 tx -> DhcpServiceUtils.bindDhcpService(interfaceName, NwConstants.DHCP_TABLE, tx)), LOG,
                 "Error writing to the datastore");
             //install the entries
-            ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
+            LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                 tx -> dhcpManager.installDhcpEntries(dpId, vmMacAddress, tx)), LOG,
                 "Error writing to the datastore");
         }
@@ -154,12 +154,12 @@ public class DhcpSubnetListener extends AbstractClusteredAsyncDataTreeChangeList
             LOG.trace("DhcpSubnetListener uninstallNeutronPortEntries dpId: {} vmMacAddress : {}",
                     dpId, vmMacAddress);
             //Unbind the dhcp service when disabled
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
                 tx -> DhcpServiceUtils.unbindDhcpService(interfaceName, tx)), LOG,
                 "Error writing to the datastore");
 
             //uninstall the entries
-            ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
+            LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                 tx -> dhcpManager.unInstallDhcpEntries(dpId, vmMacAddress, tx)), LOG,
                 "Error writing to the datastore");
         }
index c47d8e34203965bd38f447c963ea9007757d5765..bab5f04db23190d81e9f01c02da52f93e9dd22cb 100644 (file)
@@ -14,7 +14,7 @@ import org.opendaylight.genius.infra.Datastore;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.serviceutils.tools.listener.AbstractAsyncDataTreeChangeListener;
@@ -71,7 +71,7 @@ public class NodeListener extends AbstractAsyncDataTreeChangeListener<Node> {
         try {
             if (node[1] != null) {
                 Uint64 dpId = Uint64.valueOf(node[1]);
-                ListenableFutures.addErrorLogging(
+                LoggingFutures.addErrorLogging(
                         txRunner.callWithNewWriteOnlyTransactionAndSubmit(Datastore.CONFIGURATION,
                             tx -> dhcpManager.setupDefaultDhcpFlows(tx, dpId)),
                             LOG, "Error handling node addition for {}", add);
index f01a326ecaf67269382b70ed1a737a4d88685d40..f533f4b94b9603ab51826350f0573f2f96696961 100644 (file)
@@ -56,7 +56,6 @@ import org.opendaylight.genius.mdsalutil.matches.MatchIpv6Destination;
 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata;
 import org.opendaylight.genius.utils.batching.SubTransaction;
 import org.opendaylight.genius.utils.batching.SubTransactionImpl;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
 import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.WriteTransaction;
@@ -244,7 +243,7 @@ public class BaseVrfEntryHandler implements AutoCloseable {
                                       @Nullable List<InstructionInfo> instructions, int addOrRemove,
                                       WriteTransaction tx, @Nullable List<SubTransaction> subTxns) {
         if (tx == null) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
                 newTx -> makeConnectedRoute(dpId, vpnId, vrfEntry, rd, instructions, addOrRemove, newTx, subTxns)),
                 LOG, "Error making connected route");
             return;
@@ -516,7 +515,7 @@ public class BaseVrfEntryHandler implements AutoCloseable {
                                   final VrfEntry vrfEntry, Optional<Routes> extraRouteOptional,
                                   @Nullable WriteTransaction tx) {
         if (tx == null) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
                 newTx -> deleteRemoteRoute(localDpnId, remoteDpnId, vpnId, vrfTableKey, vrfEntry,
                         extraRouteOptional, newTx)), LOG, "Error deleting remote route");
             return;
index 4b012fdc68de58c9ee9937b74d7219b925adb5c8..db2a9758df879224f278eedd138847e7d8d85611 100644 (file)
@@ -40,7 +40,7 @@ import org.opendaylight.genius.utils.batching.ActionableResources;
 import org.opendaylight.genius.utils.batching.ResourceBatchingManager;
 import org.opendaylight.genius.utils.batching.ResourceHandler;
 import org.opendaylight.genius.utils.batching.SubTransaction;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.WriteTransaction;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
@@ -330,7 +330,7 @@ public class BgpRouteVrfEntryHandler extends BaseVrfEntryHandler implements Reso
                                      WriteTransaction tx,
                                      List<SubTransaction> subTxns) {
         if (tx == null) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
                 newTx -> createRemoteFibEntry(remoteDpnId, vpnId, rd, vrfEntry, newTx, subTxns)), LOG,
                 "Error creating remote FIB entry");
             return;
@@ -369,7 +369,7 @@ public class BgpRouteVrfEntryHandler extends BaseVrfEntryHandler implements Reso
                                   final VrfEntry vrfEntry, Optional<Routes> extraRouteOptional,
                                   @Nullable WriteTransaction tx, List<SubTransaction> subTxns) {
         if (tx == null) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
                 newTx -> deleteRemoteRoute(localDpnId, remoteDpnId, vpnId, vrfTableKey, vrfEntry,
                         extraRouteOptional, newTx)), LOG, "Error deleting remote route");
             return;
index f5c555f9fd4897d0ef319fe696160220b966df2e..10d646d8fbfc9c8de81780c8ba2d5d63ae9ed698 100644 (file)
@@ -72,7 +72,7 @@ import org.opendaylight.genius.utils.ServiceIndex;
 import org.opendaylight.genius.utils.batching.SubTransaction;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.netvirt.elanmanager.api.IElanService;
@@ -524,7 +524,7 @@ public class VrfEntryListener extends AbstractAsyncDataTreeChangeListener<VrfEnt
     void installSubnetRouteInFib(final Uint64 dpnId, final long elanTag, final String rd,
             final Uint32 vpnId, final VrfEntry vrfEntry, TypedWriteTransaction<Configuration> tx) {
         if (tx == null) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
                 newTx -> installSubnetRouteInFib(dpnId, elanTag, rd, vpnId, vrfEntry, newTx)), LOG,
                 "Error installing subnet route in FIB");
             return;
@@ -1218,7 +1218,7 @@ public class VrfEntryListener extends AbstractAsyncDataTreeChangeListener<VrfEnt
     private void createRemoteFibEntry(final Uint64 remoteDpnId, final Uint32 vpnId, String rd,
             final VrfEntry vrfEntry, TypedWriteTransaction<Configuration> tx) {
         if (tx == null) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
                 newTx -> createRemoteFibEntry(remoteDpnId, vpnId, rd, vrfEntry, newTx)), LOG,
                 "Error creating remote FIB entry");
             return;
@@ -1675,7 +1675,7 @@ public class VrfEntryListener extends AbstractAsyncDataTreeChangeListener<VrfEnt
     private void makeLFibTableEntry(Uint64 dpId, Uint32 label, @Nullable List<InstructionInfo> instructions,
                                     int priority, int addOrRemove, TypedWriteTransaction<Configuration> tx) {
         if (tx == null) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
                 newTx -> makeLFibTableEntry(dpId, label, instructions, priority, addOrRemove, newTx)), LOG,
                 "Error making LFIB table entry");
             return;
@@ -2123,7 +2123,7 @@ public class VrfEntryListener extends AbstractAsyncDataTreeChangeListener<VrfEnt
         optLabel.ifPresent(label -> {
             LOG.trace("Removing flow in FIB table for interVpnLink {}", interVpnLinkName);
 
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
                 for (Uint64 dpId : targetDpns) {
                     LOG.debug("Removing flow: VrfEntry=[prefix={} label={}] dpn {} for InterVpnLink {} in LFIB",
                             vrfEntry.getDestPrefix(), label, dpId, interVpnLinkName);
index b1f8eb4c4656c05c2cc078195a01a871a27e65d9..c8330fa76797e8c9ff47f5274972138112b7c935 100644 (file)
@@ -38,7 +38,7 @@ import org.opendaylight.genius.ipv6util.api.Ipv6Util;
 import org.opendaylight.genius.mdsalutil.MDSALUtil;
 import org.opendaylight.genius.mdsalutil.NwConstants;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.netvirt.elanmanager.api.IElanService;
 import org.opendaylight.netvirt.ipv6service.api.ElementCache;
@@ -1286,8 +1286,8 @@ public class IfMgr implements ElementCache, AutoCloseable {
                 intf.getIntfUUID(), ndTargetAddr);
 
         //NITHI
-        //ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
-        ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(Datastore.CONFIGURATION,
+        //LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
+        LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(Datastore.CONFIGURATION,
             tx -> {
                 /*Exact VM vNIC interface IPv6 and MAC address match flow */
                 ipv6ServiceUtils.instIcmpv6NsMatchFlow(NwConstants.IPV6_TABLE, dpnId,
@@ -1312,7 +1312,7 @@ public class IfMgr implements ElementCache, AutoCloseable {
             return;
         }
         Long elanTag = getNetworkElanTag(routerPort.getNetworkID());
-        ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(Datastore.CONFIGURATION,
+        LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(Datastore.CONFIGURATION,
             tx -> {
                 ipv6ServiceUtils.installIcmpv6NsDefaultPuntFlow(NwConstants.IPV6_TABLE,
                      dpnIfaceInfo.getDpId(), elanTag, ndTarget,
index f0a92e4834f72f34e1fa974ee6f76afc44de2202..eb7f0ebe1261d9a4b36f87fbea36c84464b26770 100644 (file)
@@ -22,7 +22,7 @@ import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
 import org.opendaylight.genius.infra.TypedReadWriteTransaction;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.netvirt.natservice.api.SnatServiceManager;
@@ -99,7 +99,7 @@ public class SnatCentralizedSwitchChangeListener
         Uint64 primarySwitchId = routerToNaptSwitch.getPrimarySwitchId();
         Routers router = natDataUtil.getRouter(routerToNaptSwitch.getRouterName());
         if (router != null) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
+            LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                 confTx -> snatServiceManger.notify(confTx, router, null, primarySwitchId, null,
                     SnatServiceManager.Action.SNAT_ALL_SWITCH_DISBL)), LOG,
                 "error handling SNAT centralized switch removal");
@@ -119,7 +119,7 @@ public class SnatCentralizedSwitchChangeListener
         }
         Uint64 origPrimarySwitchId = origRouterToNaptSwitch.getPrimarySwitchId();
         Uint64 updatedPrimarySwitchId = updatedRouterToNaptSwitch.getPrimarySwitchId();
-        ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, confTx -> {
+        LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, confTx -> {
             Routers origRouter = NatUtil.getRoutersFromConfigDS(confTx, origRouterToNaptSwitch.getRouterName());
             Routers updatedRouter = NatUtil.getRoutersFromConfigDS(confTx, updatedRouterToNaptSwitch.getRouterName());
             if (!Objects.equals(origPrimarySwitchId, updatedPrimarySwitchId)) {
@@ -186,7 +186,7 @@ public class SnatCentralizedSwitchChangeListener
             LOG.warn("VpnId not unavailable for router {} yet", routerName);
             eventCallbacks.onAddOrUpdate(LogicalDatastoreType.CONFIGURATION,
                 NatUtil.getVpnInstanceToVpnIdIdentifier(routerName), (unused, newVpnId) -> {
-                    ListenableFutures.addErrorLogging(
+                    LoggingFutures.addErrorLogging(
                         txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                             innerConfTx -> handleAdd(innerConfTx, routerName, router, primarySwitchId,
                                     isEnableSnat)), LOG,
@@ -195,7 +195,7 @@ public class SnatCentralizedSwitchChangeListener
                 }, Duration.ofSeconds(5), iid -> LOG.error("VpnId not found for router {}", routerName));
             return;
         }
-        ListenableFutures.addErrorLogging(
+        LoggingFutures.addErrorLogging(
             txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                 confTx -> handleAdd(confTx, routerName, router, primarySwitchId,
                         isEnableSnat)), LOG, "Error handling router addition");
index 50461bb3f1ecac11918c2f0dd6cda544e79bd95f..69d93ed215381307b793b8f7e55aa46980eaa912 100644 (file)
@@ -27,7 +27,7 @@ import org.opendaylight.genius.datastoreutils.ExpectedDataObjectNotFoundExceptio
 import org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
@@ -190,7 +190,7 @@ public class WeightedCentralizedSwitchScheduler implements CentralizedSwitchSche
                 }
                 return NatUtil.getPrimaryRd(routerName, tx);
             }).get();
-            ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, tx -> {
+            LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, tx -> {
                 for (Uuid subnetUuid : addedSubnetIds) {
                     Subnetmap subnetMapEntry = subnetMapEntries.get(subnetUuid);
                     Uuid routerPortUuid = subnetMapEntry.getRouterInterfacePortId();
@@ -218,7 +218,7 @@ public class WeightedCentralizedSwitchScheduler implements CentralizedSwitchSche
         try {
             String primaryRd = txRunner.applyWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                 tx -> NatUtil.getPrimaryRd(routerName, tx)).get();
-            ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, tx -> {
+            LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, tx -> {
                 for (Uuid subnetUuid : deletedSubnetIds) {
                     String routerPort = subnetIdToRouterPortMap.remove(subnetUuid.getValue());
                     if (routerPort == null) {
index c988289081983a952ca9ab469e91c9a3bee4027c..49c1c4891b34f9e3e1d793eee09173b7784d6bbe 100644 (file)
@@ -44,7 +44,7 @@ import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType;
 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Destination;
 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata;
 import org.opendaylight.genius.mdsalutil.matches.MatchTunnelId;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
@@ -477,7 +477,7 @@ public abstract class AbstractSnatService implements SnatServiceListener {
             eventCallbacks.onAddOrUpdate(LogicalDatastoreType.CONFIGURATION,
                     NatUtil.getGroupInstanceId(dpnId, groupId), (unused, newGroupId) -> {
                     LOG.info("group {} is created in the config", groupId);
-                    ListenableFutures.addErrorLogging(
+                    LoggingFutures.addErrorLogging(
                             txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                                 innerConfTx -> addSnatMissFlowForGroup(innerConfTx, dpnId, routerId, groupId)),
                             LOG, "Error adding flow for the group {}",groupId);
index 10d07c471a0f4d6474f3407b81dacdc89d3d3080..9a67311a208c13389873a19f3c5897931d3778d4 100644 (file)
@@ -43,7 +43,7 @@ import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions;
 import org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable;
 import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
 import org.opendaylight.genius.mdsalutil.matches.MatchTunnelId;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.netvirt.bgpmanager.api.IBgpManager;
@@ -171,7 +171,7 @@ public class EvpnDnatFlowProgrammer {
         LOG.debug("onAddFloatingIp : Add Floating Ip {} , found associated to fixed port {}",
                 externalIp, interfaceName);
         if (floatingIpPortMacAddress != null) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
+            LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
                 vpnManager.addSubnetMacIntoVpnInstance(vpnName, null, floatingIpPortMacAddress, dpnId, tx);
                 vpnManager.addArpResponderFlowsToExternalNetworkIps(routerName,
                         Collections.singleton(externalIp),
@@ -190,7 +190,7 @@ public class EvpnDnatFlowProgrammer {
             @Override
             public void onSuccess(@NonNull RpcResult<CreateFibEntryOutput> result) {
                 if (result.isSuccessful()) {
-                    ListenableFutures.addErrorLogging(
+                    LoggingFutures.addErrorLogging(
                         txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, innerConfTx -> {
                             LOG.info("onAddFloatingIp : Successfully installed custom FIB routes for Floating "
                                 + "IP Prefix {} on DPN {}", externalIp, dpnId);
@@ -231,7 +231,7 @@ public class EvpnDnatFlowProgrammer {
                 SingleTransactionDataBroker.syncReadOptionalAndTreatReadFailedExceptionAsAbsentOptional(dataBroker,
                         LogicalDatastoreType.CONFIGURATION, vpnIfIdentifier);
         if (optionalVpnInterface.isPresent()) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
                 for (VpnInstanceNames vpnInstance : optionalVpnInterface.get().nonnullVpnInstanceNames().values()) {
                     if (!vpnName.equals(vpnInstance.getVpnName())) {
                         continue;
@@ -323,7 +323,7 @@ public class EvpnDnatFlowProgrammer {
             @Override
             public void onSuccess(@NonNull RpcResult<RemoveFibEntryOutput> result) {
                 if (result.isSuccessful()) {
-                    ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
+                    LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                         innerConfTx -> {
                             LOG.info("onRemoveFloatingIp : Successfully removed custom FIB routes for Floating "
                                 + "IP Prefix {} on DPN {}", externalIp, dpnId);
@@ -351,7 +351,7 @@ public class EvpnDnatFlowProgrammer {
                 SingleTransactionDataBroker.syncReadOptionalAndTreatReadFailedExceptionAsAbsentOptional(dataBroker,
                         LogicalDatastoreType.CONFIGURATION, vpnIfIdentifier);
         if (optionalVpnInterface.isPresent()) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
                 for (VpnInstanceNames vpnInstance : optionalVpnInterface.get().nonnullVpnInstanceNames().values()) {
                     if (!vpnName.equals(vpnInstance.getVpnName())) {
                         continue;
index 1adb620ae0d26f61c507dcdec6dcbb45424d9e59..2b401b99c75e92d273b03ba820cf24e44396969a 100644 (file)
@@ -34,7 +34,7 @@ import org.opendaylight.genius.mdsalutil.NwConstants;
 import org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable;
 import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
 import org.opendaylight.genius.mdsalutil.matches.MatchTunnelId;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.netvirt.bgpmanager.api.IBgpManager;
 import org.opendaylight.netvirt.fibmanager.api.IFibManager;
@@ -248,7 +248,7 @@ public class EvpnSnatFlowProgrammer {
             @Override
             public void onSuccess(@NonNull RpcResult<RemoveFibEntryOutput> result) {
                 if (result.isSuccessful()) {
-                    ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
+                    LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                         innerConfTx -> {
                             LOG.info("evpnDelFibTsAndReverseTraffic : Successfully removed custom FIB routes for "
                                 + "External Fixed IP {} on DPN {} with l3Vni {}, ExternalVpnName {} for "
index 443126f769b8f50ed94ffc1ee7e732f2379f1653..020a685b79d7b4c61d9ce4a5f079833948d12109 100644 (file)
@@ -49,7 +49,7 @@ import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Source;
 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.netvirt.natservice.api.CentralizedSwitchScheduler;
@@ -881,7 +881,7 @@ public class FloatingIPListener extends AbstractAsyncDataTreeChangeListener<Inte
             @Nullable TypedReadWriteTransaction<Configuration> confTx, boolean create)
             throws ExecutionException, InterruptedException {
         if (confTx == null) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
+            LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                 newTx -> addOrDelDefaultFibRouteForDnat(dpnId, routerName, routerId, newTx, create)), LOG,
                 "Error handling default FIB route for DNAT");
             return;
index a009d12ad68ec305a68a905805f3acbc3d697de3..3473f3245271aca7ae40ded3892dcce2dbafe366 100644 (file)
@@ -19,7 +19,7 @@ import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
 import org.opendaylight.genius.mdsalutil.MDSALUtil;
 import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.serviceutils.tools.listener.AbstractAsyncDataTreeChangeListener;
@@ -103,7 +103,7 @@ public class NatRouterInterfaceListener extends AbstractAsyncDataTreeChangeListe
             final ReentrantLock lock = NatUtil.lockForNat(dpId);
             lock.lock();
             try {
-                ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL,
+                LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL,
                     operTx -> {
                         NatUtil.addToNeutronRouterDpnsMap(routerId, interfaceName, dpId, operTx);
                         NatUtil.addToDpnRoutersMap(routerId, interfaceName, dpId, operTx);
@@ -141,7 +141,7 @@ public class NatRouterInterfaceListener extends AbstractAsyncDataTreeChangeListe
                     NatUtil.removeSnatEntriesForPort(dataBroker, naptManager, mdsalManager, neutronVpnService,
                         interfaceName, routerId);
                 }
-                ListenableFutures.addErrorLogging(
+                LoggingFutures.addErrorLogging(
                     txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, operTx -> {
                         //Delete the NeutronRouterDpnMap from the ODL:L3VPN operational model
                         NatUtil
@@ -151,8 +151,8 @@ public class NatRouterInterfaceListener extends AbstractAsyncDataTreeChangeListe
                             interfaceManager, operTx);
                     }), LOG, "Error handling NAT router interface removal");
                 //Delete the RouterInterfaces maintained in the ODL:L3VPN configuration model
-                ListenableFutures
-                    .addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+                LoggingFutures.addErrorLogging(
+                    txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
                         confTx -> confTx.delete(NatUtil.getRouterInterfaceId(interfaceName))), LOG,
                         "Error handling NAT router interface removal");
             } finally {
index d11a5eab7ec2e225aff521250ddb2872f04cf87b..76f4315ae875babf0689b46572f7dafbeebcbdd3 100644 (file)
@@ -68,7 +68,7 @@ import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType;
 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata;
 import org.opendaylight.genius.utils.JvmGlobalLocks;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
@@ -2228,7 +2228,7 @@ public final class NatUtil {
 
     public static void installRouterGwFlows(ManagedNewTransactionRunner txRunner, IVpnManager vpnManager,
             Routers router, Uint64 primarySwitchId, int addOrRemove) {
-        ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
+        LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
             Map<ExternalIpsKey, ExternalIps> keyExternalIpsMap = router.getExternalIps();
             List<String> externalIpsSting = new ArrayList<>();
 
index 77bb9f3bb8f970ada93fc15f43711cd5161f6d08..32746b85565b4c62907e58cc7f81a9ee58226dac 100644 (file)
@@ -23,7 +23,7 @@ import org.opendaylight.genius.mdsalutil.NwConstants;
 import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.netvirt.natservice.api.SnatServiceManager;
@@ -127,7 +127,7 @@ public class RouterDpnChangeListener extends AbstractAsyncDataTreeChangeListener
                         LOG.debug("Skipping the notification recived for NAPT switch {}", routerUuid);
                         return;
                     }
-                    ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
+                    LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                         confTx -> {
                             natServiceManager.notify(confTx, router, null, naptSwitch, dpnId,
                                     SnatServiceManager.Action.CNT_ROUTER_ENBL);
@@ -241,7 +241,7 @@ public class RouterDpnChangeListener extends AbstractAsyncDataTreeChangeListener
                         LOG.debug("Skipping the notification recived for NAPT switch {}", routerUuid);
                         return;
                     }
-                    ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
+                    LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                         confTx -> {
                             natServiceManager.notify(confTx, router, null, naptSwitch, dpnId,
                                     SnatServiceManager.Action.CNT_ROUTER_DISBL);
index 73013b7ae27984d75a4c71e937351a8bb0ab200c..b3e62ca6c965a43dbd6f44d5a76e7eeaf481f762 100644 (file)
@@ -16,7 +16,7 @@ import javax.inject.Singleton;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.netvirt.natservice.api.CentralizedSwitchScheduler;
@@ -128,7 +128,7 @@ public class SnatExternalRoutersListener extends AbstractAsyncDataTreeChangeList
         }
         if (!Objects.equals(original.getSubnetIds(), update.getSubnetIds())
                 || !Objects.equals(original.getExternalIps(), update.getExternalIps())) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
+            LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                 confTx -> natServiceManager.notify(confTx, update, original, null, null,
                             SnatServiceManager.Action.SNAT_ROUTER_UPDATE)), LOG,
                     "error handling external router update");
index 5f1f55c082dc0a3b14ce98ef283f4fbc4b00a4f0..38f631cc151b57ec0222d1c389d38144f1b1b3fb 100644 (file)
@@ -46,7 +46,6 @@ import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType;
 import org.opendaylight.genius.mdsalutil.matches.MatchMplsLabel;
 import org.opendaylight.genius.mdsalutil.matches.MatchTunnelId;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
 import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
@@ -235,7 +234,7 @@ public class VpnFloatingIpHandler implements FloatingIPHandler {
                 customInstructions.add(new InstructionApplyActions(actionInfoFib).buildInstruction(0));
                 customInstructions.add(new InstructionGotoTable(NwConstants.PDNAT_TABLE).buildInstruction(1));
 
-                ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
+                LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
                     innerConfTx -> {
                         makeTunnelTableEntry(vpnName, dpnId, label, instructions, innerConfTx, provType);
                         makeLFibTableEntry(dpnId, label, floatingIpPortMacAddress, NwConstants.PDNAT_TABLE,
@@ -317,7 +316,7 @@ public class VpnFloatingIpHandler implements FloatingIPHandler {
             return;
         }
 
-        ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
+        LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
             String networkVpnName =  NatUtil.getAssociatedVPN(tx, networkId);
             vpnManager.removeSubnetMacFromVpnInstance(networkVpnName, subnetId.getValue(), floatingIpPortMacAddress,
                     dpnId, tx);
index 8e38c12b3543ae42e2d86a23ff83b75caf65d0a7..b81feff5c1cf85bb3dbf40977ecce5b9339f58c9 100644 (file)
@@ -41,7 +41,7 @@ import org.opendaylight.genius.infra.TypedWriteTransaction;
 import org.opendaylight.genius.mdsalutil.MDSALUtil;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.common.api.ReadFailedException;
@@ -288,7 +288,7 @@ public class NeutronPortChangeListener extends AbstractAsyncDataTreeChangeListen
                             LOG.warn("update: Interface {} is not present", portName);
                         }
                     });
-                ListenableFutures.addErrorLogging(future, LOG,
+                LoggingFutures.addErrorLogging(future, LOG,
                         "update: Failed to update interface {} with networkId {}", portName, network);
                 return Collections.singletonList(future);
             });
@@ -374,7 +374,7 @@ public class NeutronPortChangeListener extends AbstractAsyncDataTreeChangeListen
                     nvpnNatManager.handleSubnetsForExternalRouter(routerId);
                     return Collections.emptyList();
                 });
-                ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+                LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
                     confTx -> {
                         String portInterfaceName = createOfPortInterface(routerPort, confTx);
                         createElanInterface(routerPort, portInterfaceName, confTx);
@@ -419,7 +419,7 @@ public class NeutronPortChangeListener extends AbstractAsyncDataTreeChangeListen
             nvpnManager.deleteVpnInterface(routerPort.getUuid().getValue(),
                                            null /* vpn-id */, null /* wrtConfigTxn*/);
             // update RouterInterfaces map
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
                 confTx -> {
                     IpVersionChoice ipVersion = IpVersionChoice.UNDEFINED;
                     for (FixedIps portIP : keyFixedIpsMap.values()) {
@@ -697,7 +697,7 @@ public class NeutronPortChangeListener extends AbstractAsyncDataTreeChangeListen
                     }
                 }
             });
-            ListenableFutures.addErrorLogging(future, LOG,
+            LoggingFutures.addErrorLogging(future, LOG,
                     "handleNeutronPortCreated: Failed for port {} with networkId {}", portName, networkId);
             return Collections.singletonList(future);
         });
@@ -767,7 +767,7 @@ public class NeutronPortChangeListener extends AbstractAsyncDataTreeChangeListen
                 //dissociate fixedIP from floatingIP if associated
                 nvpnManager.dissociatefixedIPFromFloatingIP(port.getUuid().getValue());
             });
-            ListenableFutures.addErrorLogging(future, LOG,
+            LoggingFutures.addErrorLogging(future, LOG,
                     "handleNeutronPortDeleted: Failed to update interface {} with networkId", portName,
                     port.getNetworkId().getValue());
             return Collections.singletonList(future);
index 35ace8967349b7a26141781ce4bb17ece790fd5c..ce0ff1cf6b04bca147ba5d318694c916aee6108a 100644 (file)
@@ -5,7 +5,6 @@
  * 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.netvirt.neutronvpn;
 
 import com.google.common.util.concurrent.JdkFutureAdapters;
@@ -26,7 +25,7 @@ import javax.inject.Singleton;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.genius.arputil.api.ArpConstants;
 import org.opendaylight.genius.mdsalutil.NWUtil;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.netvirt.elanmanager.api.IElanService;
 import org.opendaylight.netvirt.vpnmanager.api.ICentralizedSwitchProvider;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
@@ -175,7 +174,7 @@ public class NeutronSubnetGwMacResolver {
             SendArpRequestInput sendArpRequestInput = new SendArpRequestInputBuilder().setIpaddress(dstIpAddress)
                     .setInterfaceAddress(Collections.singletonList(interfaceAddress)).build();
 
-            ListenableFutures.addErrorLogging(JdkFutureAdapters.listenInPoolThread(
+            LoggingFutures.addErrorLogging(JdkFutureAdapters.listenInPoolThread(
                     arpUtilService.sendArpRequest(sendArpRequestInput)), LOG, "Send ARP request");
         } catch (Exception e) {
             LOG.error("Failed to send ARP request to external GW {} from interface {}",
index 1f462df8f61a7846cc5e5eb61172c8bb9f846ee9..dc9fdfb46c8d88567f9dc7b204b8347e184a04c6 100644 (file)
@@ -52,7 +52,7 @@ import org.opendaylight.genius.infra.TypedWriteTransaction;
 import org.opendaylight.genius.mdsalutil.NwConstants;
 import org.opendaylight.genius.utils.JvmGlobalLocks;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.infrautils.utils.concurrent.NamedLocks;
 import org.opendaylight.infrautils.utils.concurrent.NamedSimpleReentrantLock.AcquireResult;
 import org.opendaylight.mdsal.binding.api.DataBroker;
@@ -978,7 +978,7 @@ public class NeutronvpnManager implements NeutronvpnService, AutoCloseable, Even
     protected void deleteVpnInterface(String infName, @Nullable String vpnId,
                                       @Nullable TypedWriteTransaction<Configuration> wrtConfigTxn) {
         if (wrtConfigTxn == null) {
-            ListenableFutures.addErrorLogging(
+            LoggingFutures.addErrorLogging(
                     txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
                         tx -> deleteVpnInterface(infName, vpnId, tx)),
                     LOG, "Error deleting VPN interface {} {}", infName, vpnId);
@@ -1697,7 +1697,7 @@ public class NeutronvpnManager implements NeutronvpnService, AutoCloseable, Even
                                 }
                             }
                         });
-                    ListenableFutures.addErrorLogging(future, LOG,
+                    LoggingFutures.addErrorLogging(future, LOG,
                             "addSubnetToVpn: Failed while creating VPN interface for vpnId {}, portId {}"
                                     + "{}, subnetId {}", vpnId.getValue(), portId, subnet.getValue());
                     return Collections.singletonList(future);
@@ -1772,7 +1772,7 @@ public class NeutronvpnManager implements NeutronvpnService, AutoCloseable, Even
                                         subnetId.getValue());
                             }
                         });
-                    ListenableFutures.addErrorLogging(future, LOG,
+                    LoggingFutures.addErrorLogging(future, LOG,
                             "removeSubnetFromVpn: Exception while processing deletion of VPN interfaces for port {}"
                                     + " belonging to subnet {} and vpnId {}",
                             portId.getValue(), subnetId.getValue(), vpnId.getValue());
@@ -2026,7 +2026,7 @@ public class NeutronvpnManager implements NeutronvpnService, AutoCloseable, Even
                                 .setVpnInstanceName(vpnName.getValue())
                                 .build();
 
-                ListenableFutures.addErrorLogging(JdkFutureAdapters.listenInPoolThread(
+                LoggingFutures.addErrorLogging(JdkFutureAdapters.listenInPoolThread(
                         vpnRpcService.removeStaticRoute(rpcInput)), LOG, "Remove VPN routes");
             } else {
                 // Any other case is a fault.
@@ -3153,7 +3153,7 @@ public class NeutronvpnManager implements NeutronvpnService, AutoCloseable, Even
             return;
         }
 
-        ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
+        LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
             for (String elanInterface : extElanInterfaces) {
                 createExternalVpnInterface(extNetId, elanInterface, tx);
             }
@@ -3168,7 +3168,7 @@ public class NeutronvpnManager implements NeutronvpnService, AutoCloseable, Even
             LOG.error("No external ports attached for external network {}", extNetId.getValue());
             return;
         }
-        ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
+        LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
             for (String elanInterface : extElanInterfaces) {
                 InstanceIdentifier<VpnInterface> vpnIfIdentifier = NeutronvpnUtils
                         .buildVpnInterfaceIdentifier(elanInterface);
@@ -3194,7 +3194,7 @@ public class NeutronvpnManager implements NeutronvpnService, AutoCloseable, Even
             return;
         }
         if (wrtConfigTxn == null) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
                 tx -> writeVpnInterfaceToDs(vpnIdList, infName, adjacencies, networkUuid, isRouterInterface, tx)), LOG,
                 "Error writing VPN interface");
             return;
@@ -3242,7 +3242,7 @@ public class NeutronvpnManager implements NeutronvpnService, AutoCloseable, Even
         }
         if (wrtConfigTxn == null) {
             LOG.error("updateVpnInterfaceWithAdjancies called with wrtConfigTxn as null");
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
                 updateVpnInterfaceWithAdjacencies(vpnId, infName, adjacencies, tx);
             }), LOG, "Error updating VPN interface with adjacencies");
             return;
index dea6907054eb9c3c61d8829c24ce6fe9d516d1c6..d54bda3285e3300444c1986975f14d51367c9319 100644 (file)
@@ -48,7 +48,6 @@ import org.opendaylight.genius.infra.TypedWriteTransaction;
 import org.opendaylight.genius.mdsalutil.MDSALUtil;
 import org.opendaylight.genius.utils.JvmGlobalLocks;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
 import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.ReadTransaction;
@@ -1695,7 +1694,7 @@ public class NeutronvpnUtils {
         }
         VpnInstanceOpDataEntryBuilder builder = new VpnInstanceOpDataEntryBuilder(vpnInstanceOpDataEntry);
         builder.setBgpvpnType(choice);
-        ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
+        LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
             tx.merge(id, builder.build());
             LOG.debug("updateVpnInstanceOpWithType: sent merge to operDS BgpvpnType {} for {}", choice, vpn.getValue());
         }), LOG, "Error updating VPN instance op {} with type {}", vpn, choice);
index 522133ebb3c7a9391bb721fc81275316f6457b36..1f5c2bf852b803c11ba147a42e2ea63aff5dd9c4 100644 (file)
@@ -16,7 +16,7 @@ import org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.netvirt.elanmanager.api.ElanHelper;
@@ -77,7 +77,7 @@ public class NeutronEvpnUtils {
     public void updateElanWithVpnInfo(String elanInstanceName, VpnInstance vpnInstance, Operation operation) {
         String vpnName = vpnInstance.getVpnInstanceName();
         InstanceIdentifier<ElanInstance> elanIid = ElanHelper.getElanInstanceConfigurationDataPath(elanInstanceName);
-        ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
+        LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
             Optional<ElanInstance> elanInstanceOptional =
                     tx.read(elanIid).get();
             if (!elanInstanceOptional.isPresent()) {
index 95d8bb84c02129b56354e02ccdaf9b79e01b3511..3cf86728527b9d66688e17d27fa7612640807dcf 100644 (file)
@@ -32,7 +32,7 @@ import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
 import org.opendaylight.genius.interfacemanager.globals.IfmConstants;
 import org.opendaylight.genius.interfacemanager.globals.InterfaceInfo;
 import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511.GetNodeConnectorStatisticsInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511.GetNodeConnectorStatisticsOutput;
@@ -322,7 +322,7 @@ public final class QosAlertManager implements Runnable {
                 .setQosAlertPollInterval(alertPollInterval)
                 .build();
 
-        ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+        LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
             tx -> tx.mergeParentStructurePut(path,
                     qosAlertConfig)), LOG, "Error writing to the config data store");
     }
index 6c26d9e6cbcd65fbbc54c1f5c57db8e431d7a9f9..23986c509f6f99fee81a8f21c5b3e1825aef0adf 100644 (file)
@@ -21,7 +21,7 @@ import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.netvirt.qosservice.recovery.QosServiceRecoveryHandler;
@@ -324,7 +324,7 @@ public class QosPolicyChangeListener extends AbstractClusteredAsyncDataTreeChang
 
         qrtBuilder.setRuleTypes(value);
 
-        ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
+        LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
             InstanceIdentifier instanceIdentifier = InstanceIdentifier.create(Neutron.class).child(QosRuleTypes.class);
             tx.merge(instanceIdentifier, qrtBuilder.build());
         }), LOG, "Error setting up supported QoS rule types");
index 60c97ffa54c66bdda52f2a5e10733708f66b9922..098442d513fe0588c7cd1ecbf1bfb684e1b92a2d 100644 (file)
@@ -34,7 +34,7 @@ import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
 import org.opendaylight.genius.mdsalutil.MDSALUtil;
 import org.opendaylight.genius.mdsalutil.MatchInfoBase;
 import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.ReadTransaction;
 import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
@@ -235,7 +235,7 @@ public class StatisticsImpl implements StatisticsService, ICountersInterfaceChan
         String requestKey = String.valueOf(intRequestKey);
         SettableFuture<RpcResult<AcquireElementCountersRequestHandlerOutput>> result = SettableFuture.create();
 
-        ListenableFutures.addErrorLogging(
+        LoggingFutures.addErrorLogging(
             txRunner.callWithNewReadWriteTransactionAndSubmit(transaction -> {
                 if (input.getIncomingTraffic() != null) {
                     Optional<EgressElementCountersRequestConfig> eecrcOpt =
@@ -310,7 +310,7 @@ public class StatisticsImpl implements StatisticsService, ICountersInterfaceChan
                         .child(CounterRequests.class, new CounterRequestsKey(input.getHandler())).build();
 
         SettableFuture<RpcResult<ReleaseElementCountersRequestHandlerOutput>> result = SettableFuture.create();
-        ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(tx -> {
+        LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(tx -> {
             Optional<IngressElementCountersRequestConfig> iecrcOpt =
                     tx.read(LogicalDatastoreType.CONFIGURATION, CountersServiceUtils.IECRC_IDENTIFIER).get();
             Optional<EgressElementCountersRequestConfig> eecrcOpt =
@@ -544,7 +544,7 @@ public class StatisticsImpl implements StatisticsService, ICountersInterfaceChan
     }
 
     private void deleteCounterRequest(CounterRequests counterRequest, ElementCountersDirection direction) {
-        ListenableFutures.addErrorLogging(
+        LoggingFutures.addErrorLogging(
             txRunner.callWithNewWriteOnlyTransactionAndSubmit(tx -> {
                 if (ElementCountersDirection.INGRESS.equals(direction)) {
                     tx.delete(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier
@@ -580,7 +580,7 @@ public class StatisticsImpl implements StatisticsService, ICountersInterfaceChan
     }
 
     private void initializeCountrsConfigDataSrore() {
-        ListenableFutures.addErrorLogging(
+        LoggingFutures.addErrorLogging(
             txRunner.callWithNewReadWriteTransactionAndSubmit(transaction -> {
                 Optional<IngressElementCountersRequestConfig> iecrcOpt =
                         transaction.read(LogicalDatastoreType.CONFIGURATION,
index b84d8b23034b09b9f03c6b0973c6d649e5df26ca..c526bf8c7ff7f6010058bdbf29ccb864bc4a035e 100644 (file)
@@ -23,7 +23,7 @@ import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
 import org.opendaylight.genius.infra.TypedReadWriteTransaction;
 import org.opendaylight.genius.mdsalutil.NwConstants;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.netvirt.vpnmanager.api.IVpnManager;
@@ -87,7 +87,7 @@ public class CentralizedSwitchChangeListener
     @Override
     public void remove(InstanceIdentifier<RouterToNaptSwitch> key, RouterToNaptSwitch routerToNaptSwitch) {
         LOG.debug("Removing {}", routerToNaptSwitch);
-        ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx ->
+        LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx ->
                                             setupRouterGwFlows(routerToNaptSwitch, tx, NwConstants.DEL_FLOW)), LOG,
                                                 "Error processing switch removal for {}", routerToNaptSwitch);
     }
@@ -98,7 +98,7 @@ public class CentralizedSwitchChangeListener
         LOG.debug("Updating old {} new {}", origRouterToNaptSwitch, updatedRouterToNaptSwitch);
         if (!Objects.equals(updatedRouterToNaptSwitch.getPrimarySwitchId(),
                 origRouterToNaptSwitch.getPrimarySwitchId())) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
+            LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
                 setupRouterGwFlows(origRouterToNaptSwitch, tx, NwConstants.DEL_FLOW);
                 setupRouterGwFlows(updatedRouterToNaptSwitch, tx, NwConstants.ADD_FLOW);
             }), LOG, "Error updating switch {} to {}", origRouterToNaptSwitch, updatedRouterToNaptSwitch);
@@ -108,7 +108,7 @@ public class CentralizedSwitchChangeListener
     @Override
     public void add(InstanceIdentifier<RouterToNaptSwitch> key, RouterToNaptSwitch routerToNaptSwitch) {
         LOG.debug("Adding {}", routerToNaptSwitch);
-        ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx ->
+        LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx ->
                         setupRouterGwFlows(routerToNaptSwitch, tx, NwConstants.ADD_FLOW)), LOG,
                 "Error processing switch addition for {}", routerToNaptSwitch);
     }
index 42131ce1bc86cf6933c3ebc915c1944112e0d1e6..ffd0b5292de594f16b5c1b9d5f38d44775cd6963 100644 (file)
@@ -18,7 +18,7 @@ import javax.inject.Singleton;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.serviceutils.tools.listener.AbstractAsyncDataTreeChangeListener;
@@ -111,7 +111,7 @@ public class FibEntriesListener extends AbstractAsyncDataTreeChangeListener<VrfE
                     routeIds.add(label);
                 }
             });
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx ->
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx ->
                             tx.put(VpnUtil.getVpnInstanceOpDataIdentifier(rd),
                                     new VpnInstanceOpDataEntryBuilder(vpnInstanceOpData).setRouteEntryId(routeIds)
                                             .build())),
@@ -132,7 +132,7 @@ public class FibEntriesListener extends AbstractAsyncDataTreeChangeListener<VrfE
             } else {
                 LOG.debug("Removing label from vpn info - {}", labels);
                 routeIds.removeAll(labels);
-                ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx ->
+                LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx ->
                                 tx.put(VpnUtil.getVpnInstanceOpDataIdentifier(rd),
                                         new VpnInstanceOpDataEntryBuilder(vpnInstanceOpData).setRouteEntryId(routeIds)
                                                 .build())),
index e2d1c7e663922e2746111a32b91d8ab1387499b7..69cee4769699db8fae2223f161d3901e30ab3d30 100644 (file)
@@ -20,7 +20,7 @@ import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
 import org.opendaylight.genius.utils.JvmGlobalLocks;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.netvirt.vpnmanager.api.IVpnManager;
@@ -239,7 +239,7 @@ public class SubnetmapChangeListener extends AbstractAsyncDataTreeChangeListener
     protected long getElanTag(String elanInstanceName) {
         final long[] elanTag = {0L};
 
-        ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(tx -> {
+        LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(tx -> {
             InstanceIdentifier<ElanInstance> elanIdentifierId = InstanceIdentifier.builder(ElanInstances.class)
                     .child(ElanInstance.class, new ElanInstanceKey(elanInstanceName)).build();
             ElanInstance elanInstance = tx.read(LogicalDatastoreType.CONFIGURATION, elanIdentifierId)
index c4a04c34c805d97d648a06c48330b0bb5f6672d0..82fadd7bc5bac7f3933d9bf613380b85f3f73eec 100644 (file)
@@ -18,7 +18,7 @@ import javax.inject.Singleton;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.netvirt.elanmanager.api.IElanService;
@@ -84,7 +84,7 @@ public class VpnElanInterfaceChangeListener extends AbstractAsyncDataTreeChangeL
         }
 
         InstanceIdentifier<VpnInterface> vpnInterfaceIdentifier = VpnUtil.getVpnInterfaceIdentifier(interfaceName);
-        ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx ->
+        LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx ->
             tx.delete(vpnInterfaceIdentifier)), LOG, "Error removing VPN interface {}", vpnInterfaceIdentifier);
         LOG.info("remove: Removed VPN interface {}", interfaceName);
     }
index 9bf4ec081cb2a69dbc154b6fdca58024cae68b25..a77c0c9a8647464e4a14e9759c9babac36150fd3 100644 (file)
@@ -49,7 +49,7 @@ import org.opendaylight.genius.utils.JvmGlobalLocks;
 import org.opendaylight.genius.utils.SystemPropertyReader;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.netvirt.fibmanager.api.IFibManager;
@@ -216,7 +216,7 @@ public class VpnInstanceListener extends AbstractAsyncDataTreeChangeListener<Vpn
             futures.add(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, confTx -> {
                 ListenableFuture<Void> future = txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, operTx ->
                         addVpnInstance(vpnInstance, confTx, operTx));
-                ListenableFutures.addErrorLogging(future, LOG, "{} call: error creating VPN {} rd {}",
+                LoggingFutures.addErrorLogging(future, LOG, "{} call: error creating VPN {} rd {}",
                         LOGGING_PREFIX_ADD, vpnInstance.getVpnInstanceName(),
                         vpnInstance.getRouteDistinguisher());
                 futures.add(future);
@@ -233,12 +233,12 @@ public class VpnInstanceListener extends AbstractAsyncDataTreeChangeListener<Vpn
     private void addVpnInstance(VpnInstance value, TypedWriteTransaction<Configuration> writeConfigTxn,
             TypedWriteTransaction<Operational> writeOperTxn) {
         if (writeConfigTxn == null) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx ->
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx ->
                 addVpnInstance(value, tx, writeOperTxn)), LOG, "Error adding VPN instance {}", value);
             return;
         }
         if (writeOperTxn == null) {
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx ->
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx ->
                 addVpnInstance(value, writeConfigTxn, tx)), LOG, "Error adding VPN instance {}", value);
             return;
         }
index 0cd01626f5ee6fde10804373a9ae7a6addfc7590..f703ddc010cc21a60374783ada7787b1ba46a3d0 100755 (executable)
@@ -53,7 +53,7 @@ import org.opendaylight.genius.utils.JvmGlobalLocks;
 import org.opendaylight.infrautils.caches.CacheProvider;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
@@ -350,7 +350,7 @@ public class VpnInterfaceManager extends AbstractAsyncDataTreeChangeListener<Vpn
                                 LOG.info("addVpnInterface: Router interface {} for vpn {} on dpn {}", interfaceName,
                                     vpnName, vpnInterface.getDpnId());
                             });
-                        ListenableFutures.addErrorLogging(future, LOG,
+                        LoggingFutures.addErrorLogging(future, LOG,
                             "Error creating FIB entry for interface {} on VPN {}", vpnInterface.getName(), vpnName);
                         return Collections.singletonList(future);
                     });
@@ -1189,7 +1189,7 @@ public class VpnInterfaceManager extends AbstractAsyncDataTreeChangeListener<Vpn
         for (VpnInstanceOpDataEntry vpn : vpnsToExportRoute) {
             List<VrfEntry> vrfEntries = vpnUtil.getAllVrfEntries(vpn.getVrfId());
             if (vrfEntries != null) {
-                ListenableFutures.addErrorLogging(
+                LoggingFutures.addErrorLogging(
                     txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, confTx -> {
                         for (VrfEntry vrfEntry : vrfEntries) {
                             try {
@@ -1259,7 +1259,7 @@ public class VpnInterfaceManager extends AbstractAsyncDataTreeChangeListener<Vpn
                         deleteFibEntryForRouterInterface(vpnInterface, confTx, vpnName);
                         LOG.info("remove: Router interface {} for vpn {}", interfaceName, vpnName);
                     });
-                ListenableFutures.addErrorLogging(future, LOG, "Error removing call for interface {} on VPN {}",
+                LoggingFutures.addErrorLogging(future, LOG, "Error removing call for interface {} on VPN {}",
                         vpnInterface.getName(), vpnName);
                 return Collections.singletonList(future);
             }, DJC_MAX_RETRIES);
@@ -1897,7 +1897,7 @@ public class VpnInterfaceManager extends AbstractAsyncDataTreeChangeListener<Vpn
                     MoreExecutors.directExecutor());
                 futures.add(configTxFuture);
                 for (ListenableFuture<Void> future : futures) {
-                    ListenableFutures.addErrorLogging(future, LOG, "update: failed for interface {} on vpn {}",
+                    LoggingFutures.addErrorLogging(future, LOG, "update: failed for interface {} on vpn {}",
                             update.getName(), update.getVpnInstanceNames());
                 }
             } else {
index e5faa9f4db80ed8cd424529dfe0202e7f1c78e97..bce704258b53020985e14dbfa188d46ff0f65447 100644 (file)
@@ -71,7 +71,7 @@ import org.opendaylight.genius.utils.JvmGlobalLocks;
 import org.opendaylight.genius.utils.ServiceIndex;
 import org.opendaylight.genius.utils.SystemPropertyReader;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.WriteTransaction;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
@@ -641,7 +641,7 @@ public final class VpnUtil {
         Optional<VrfTables> vrfTablesOpc = read(LogicalDatastoreType.CONFIGURATION, vpnVrfTableIid);
         if (vrfTablesOpc.isPresent()) {
             VrfTables vrfTables = vrfTablesOpc.get();
-            ListenableFutures.addErrorLogging(
+            LoggingFutures.addErrorLogging(
                     new ManagedNewTransactionRunnerImpl(dataBroker).callWithNewWriteOnlyTransactionAndSubmit(
                                                                             Datastore.CONFIGURATION, tx -> {
                             for (VrfEntry vrfEntry : vrfTables.nonnullVrfEntry().values()) {
@@ -672,7 +672,7 @@ public final class VpnUtil {
     public void removeVrfEntries(String rd, List<VrfEntry> vrfEntries) {
         InstanceIdentifier<VrfTables> vpnVrfTableIid =
             InstanceIdentifier.builder(FibEntries.class).child(VrfTables.class, new VrfTablesKey(rd)).build();
-        ListenableFutures.addErrorLogging(
+        LoggingFutures.addErrorLogging(
                 new ManagedNewTransactionRunnerImpl(dataBroker).callWithNewWriteOnlyTransactionAndSubmit(
                                                                             Datastore.CONFIGURATION, tx -> {
                         for (VrfEntry vrfEntry : vrfEntries) {
index 6760f9f8d0eeef78c32f13b31765e9cd98295ab6..0adb6cca7404e940263862c6d91008be05f504e0 100755 (executable)
@@ -27,7 +27,7 @@ import org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
 import org.opendaylight.genius.mdsalutil.NwConstants;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.netvirt.bgpmanager.api.IBgpManager;
@@ -192,7 +192,7 @@ public class IVpnLinkServiceImpl implements IVpnLinkService, AutoCloseable {
                               .child(VrfTables.class, new VrfTablesKey(dstVpnRd))
                               .child(VrfEntry.class, new VrfEntryKey(newVrfEntry.getDestPrefix()))
                               .build();
-        ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx ->
+        LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx ->
             tx.put(newVrfEntryIid, newVrfEntry)), LOG, "Error adding VRF entry {}", newVrfEntry);
 
         // Finally, route is advertised it to the DC-GW. But while in the FibEntries the nexthop is the other
index 938a6230e53e6e1fc5bffbd399583c1121144e7b..5e0c191d798c9585ce342b9926aa80cfaae0b245 100755 (executable)
@@ -29,7 +29,6 @@ import org.opendaylight.genius.mdsalutil.NwConstants;
 import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
 import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
 import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.NotificationPublishService;
@@ -363,7 +362,7 @@ public class InterVpnLinkListener extends AbstractAsyncDataTreeChangeListener<In
         // Removing the InterVpnLinkState
         InstanceIdentifier<InterVpnLinkState> interVpnLinkStateIid =
             InterVpnLinkUtil.getInterVpnLinkStateIid(del.getName());
-        ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx ->
+        LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx ->
             tx.delete(interVpnLinkStateIid)), LOG, "Error deleting inter-VPN link state {}", interVpnLinkStateIid);
     }
 
@@ -464,7 +463,7 @@ public class InterVpnLinkListener extends AbstractAsyncDataTreeChangeListener<In
             new InterVpnLinkStateBuilder(vpnLinkState).setState(InterVpnLinkState.State.Error)
                 .setErrorDescription(errorMsg)
                 .build();
-        ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx ->
+        LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx ->
             tx.mergeParentStructurePut(vpnLinkStateIid, vpnLinkErrorState)),
                 LOG, "Error storing the VPN link error state for {}, {}", vpnLinkStateIid, vpnLinkErrorState);
 
index 023bc0dd41819652ee43a72bc87e4f16aff4805f..dac94b5469aa8f2204be7e6a635de07b96a5a944 100644 (file)
@@ -15,7 +15,7 @@ import java.util.concurrent.Callable;
 import org.opendaylight.genius.infra.Datastore;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
 import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.netvirt.vpnmanager.VpnUtil;
 import org.opendaylight.netvirt.vpnmanager.iplearn.model.MacEntry;
@@ -68,7 +68,7 @@ public class IpMonitorStopTask implements Callable<List<? extends ListenableFutu
             vpnUtil.removeVpnPortFixedIpToPort(dataBroker, macEntry.getVpnName(),
                     macEntry.getIpAddress().getHostAddress(), null);
 
-            ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
+            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(
                     Datastore.CONFIGURATION, tx -> vpnUtil.removeMipAdjacency(macEntry.getVpnName(),
                             macEntry.getInterfaceName(), macEntry.getIpAddress().getHostAddress(), tx)),
                     LOG, "ArpMonitorStopTask: Error writing to datastore for Vpn {} IP  {}",
index baab86afb6bc90d7150a7fe29bfc540179e2bbac..458d15b94c9f6be8117bb2a5c7cd8067787bbf6f 100644 (file)
@@ -8,7 +8,7 @@
 package org.opendaylight.netvirt.vpnmanager.populator.impl;
 
 import static org.opendaylight.genius.infra.Datastore.OPERATIONAL;
-import static org.opendaylight.infrautils.utils.concurrent.ListenableFutures.addErrorLogging;
+import static org.opendaylight.infrautils.utils.concurrent.LoggingFutures.addErrorLogging;
 
 import com.google.common.base.Preconditions;
 import java.util.Collections;