Remove unused exceptions 61/74461/5
authorStephen Kitt <skitt@redhat.com>
Wed, 25 Jul 2018 14:48:13 +0000 (16:48 +0200)
committerSam Hague <shague@redhat.com>
Sat, 28 Jul 2018 01:34:47 +0000 (01:34 +0000)
This drops exception declarations which are never used.

Change-Id: I754690dcd1aa17dcd9b56fb290dcf173d2f6fc08
Signed-off-by: Stephen Kitt <skitt@redhat.com>
23 files changed:
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/BgpConfigurationManager.java
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/ConfigureBgpCli.java
bgpmanager/impl/src/main/java/org/opendaylight/netvirt/bgpmanager/DisplayBgpConfigCli.java
coe/impl/src/main/java/org/opendaylight/netvirt/coe/utils/CoeUtils.java
dhcpservice/shell/src/main/java/org/opendaylight/netvirt/dhcpservice/shell/DhcpCacheCli.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanInstanceManager.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanInterfaceManager.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanInterfaceStateClusteredListener.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanLearntVpnVipToPortListener.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/InterfaceAddWorkerOnElan.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/InterfaceAddWorkerOnElanInterface.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/l2gw/ha/handlers/HAEventHandler.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/l2gw/ha/handlers/IHAEventHandler.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/l2gw/ha/listeners/HAConfigNodeListener.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/l2gw/ha/listeners/HAOpNodeListener.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/l2gw/ha/listeners/HwvtepNodeBaseListener.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/l2gw/utils/ElanL2GatewayUtils.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/utils/ElanDmacUtils.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/utils/ElanUtils.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnClusterEosBasedOwnershipDriver.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnClusterOwnershipDriverBase.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnClusterShardBasedOwnershipDriver.java
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/iplearn/LearntVpnVipToPortEventProcessor.java

index 44aa7385708cf47264fd270f45cd7d284e40144e..de83f6ab613c697764c8bd24f38dfa4d961c68c7 100755 (executable)
@@ -32,13 +32,11 @@ import java.util.Timer;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
 import javax.annotation.Nullable;
@@ -1679,36 +1677,32 @@ public class BgpConfigurationManager {
             cancelPreviousReplayJob();
         }
         Runnable task = () -> {
-            try {
-                LOG.info("running bgp replay task ");
-                if (get() == null) {
-                    String host = getConfigHost();
-                    int port = getConfigPort();
-                    LOG.info("connecting  to bgp host {} ", host);
-                    bgpRouter.connect(host, port);
-                    LOG.info("no config to push in bgp replay task ");
-                    return;
-                }
-                setStaleStartTime(System.currentTimeMillis());
-                LOG.info("started creating stale fibDSWriter  map ");
-                createStaleFibMap();
-                setStaleEndTime(System.currentTimeMillis());
-                LOG.info("took {} msecs for stale fibDSWriter map creation ", getStaleEndTime() - getStaleStartTime());
-                LOG.info("started bgp config replay ");
-                setCfgReplayStartTime(System.currentTimeMillis());
-                boolean replaySucceded = replay();
-                setCfgReplayEndTime(System.currentTimeMillis());
-                LOG.info("took {} msecs for bgp replay ", getCfgReplayEndTime() - getCfgReplayStartTime());
-                if (replaySucceded) {
-                    LOG.info("starting the stale cleanup timer");
-                    long routeSyncTime = getStalePathtime(BGP_RESTART_ROUTE_SYNC_SEC, config.getAsId());
-                    setStaleCleanupTime(routeSyncTime);
-                    routeCleanupFuture = executor.schedule(new RouteCleanup(), routeSyncTime, TimeUnit.SECONDS);
-                } else {
-                    staledFibEntriesMap.clear();
-                }
-            } catch (InterruptedException | TimeoutException | ExecutionException eCancel) {
-                LOG.error("Stale Cleanup Task Cancelled", eCancel);
+            LOG.info("running bgp replay task ");
+            if (get() == null) {
+                String host = getConfigHost();
+                int port = getConfigPort();
+                LOG.info("connecting  to bgp host {} ", host);
+                bgpRouter.connect(host, port);
+                LOG.info("no config to push in bgp replay task ");
+                return;
+            }
+            setStaleStartTime(System.currentTimeMillis());
+            LOG.info("started creating stale fibDSWriter  map ");
+            createStaleFibMap();
+            setStaleEndTime(System.currentTimeMillis());
+            LOG.info("took {} msecs for stale fibDSWriter map creation ", getStaleEndTime() - getStaleStartTime());
+            LOG.info("started bgp config replay ");
+            setCfgReplayStartTime(System.currentTimeMillis());
+            boolean replaySucceded = replay();
+            setCfgReplayEndTime(System.currentTimeMillis());
+            LOG.info("took {} msecs for bgp replay ", getCfgReplayEndTime() - getCfgReplayStartTime());
+            if (replaySucceded) {
+                LOG.info("starting the stale cleanup timer");
+                long routeSyncTime = getStalePathtime(BGP_RESTART_ROUTE_SYNC_SEC, config.getAsId());
+                setStaleCleanupTime(routeSyncTime);
+                routeCleanupFuture = executor.schedule(new RouteCleanup(), routeSyncTime, TimeUnit.SECONDS);
+            } else {
+                staledFibEntriesMap.clear();
             }
         };
         lastReplayJobFt = executor.submit(task);
@@ -2103,7 +2097,7 @@ public class BgpConfigurationManager {
     }
 
     @SuppressWarnings("checkstyle:IllegalCatch")
-    public synchronized boolean replay() throws InterruptedException, TimeoutException, ExecutionException {
+    public synchronized boolean replay() {
         boolean replaySucceded = true;
         String host = getConfigHost();
         int port = getConfigPort();
index f8eae51b2fa30071b7ec8d5fc03407d6471d3eb5..0dac29c9b7ca3b22c37158401e57cefedeaf2f40 100644 (file)
@@ -113,7 +113,7 @@ public class ConfigureBgpCli extends OsgiCommandSupport {
     }
 
     @Override
-    protected Object doExecute() throws Exception {
+    protected Object doExecute() {
         if (op == null) {
             session.getConsole().println("Please provide valid operation");
             usage();
index 8cdbc8119afb5753d23c2e8eadbcd65791ac7699..ed9cc7423d25f5a087bba78df5cc179f9b906ccd 100644 (file)
@@ -31,7 +31,7 @@ public class DisplayBgpConfigCli extends OsgiCommandSupport {
     }
 
     @Override
-    protected Object doExecute() throws Exception {
+    protected Object doExecute() {
         PrintStream ps = session.getConsole();
 
         if (debug) {
index 3bb3c4ecbec29be8651d5ec056ec0c87c8b7422f..c38e8cb3c0643fcd99a1d6c1b60640f947730be6 100644 (file)
@@ -22,7 +22,6 @@ import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.ReadTransaction;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
 
 import org.opendaylight.genius.infra.Datastore;
 import org.opendaylight.genius.infra.TypedReadWriteTransaction;
@@ -198,7 +197,7 @@ public final class CoeUtils {
     }
 
     public static InstanceIdentifier<Pods> getPodUUIDforPodName(String podName, DataBroker dataBroker)
-            throws ReadFailedException, ExecutionException, InterruptedException {
+            throws ExecutionException, InterruptedException {
         ReadTransaction readTransaction = dataBroker.newReadOnlyTransaction();
         InstanceIdentifier<PodIdentifier> id = InstanceIdentifier.builder(PodidentifierInfo.class)
                 .child(PodIdentifier.class, new PodIdentifierKey(podName)).build();
@@ -257,7 +256,7 @@ public final class CoeUtils {
                                                  org.opendaylight.yang.gen.v1.urn.opendaylight.coe.northbound.pod
                                                          .rev170611.pod_attributes.Interface podInterface,
                                                  TypedReadWriteTransaction<Datastore.Configuration> wrtConfigTxn)
-            throws ReadFailedException, ExecutionException, InterruptedException {
+            throws ExecutionException, InterruptedException {
         String elanInstanceName = buildElanInstanceName(nodeIp, networkNS);
         InstanceIdentifier<ElanInstance> id = createElanInstanceIdentifier(elanInstanceName);
         ElanInstance existingElanInstance = wrtConfigTxn.read(id).get().orNull();
@@ -310,8 +309,7 @@ public final class CoeUtils {
 
     public static void createVpnInstance(String vpnName, List<String> rd, List<String> irt, List<String> ert,
                                          VpnInstance.Type type, long l3vni, IpVersionChoice ipVersion,
-                                         TypedReadWriteTransaction<Datastore.Configuration> tx)
-            throws ReadFailedException {
+                                         TypedReadWriteTransaction<Datastore.Configuration> tx) {
         List<VpnTarget> vpnTargetList = new ArrayList<>();
         LOG.debug("Creating/Updating a new vpn-instance node: {} ", vpnName);
 
index da46b950dfe46f1d3ccc030bf2515f05a722dccf..edf3d05c91808797c065b97e312583de9754b7ed 100644 (file)
@@ -24,7 +24,7 @@ public class DhcpCacheCli extends OsgiCommandSupport {
     }
 
     @Override
-    protected Object doExecute() throws Exception {
+    protected Object doExecute() {
         session.getConsole().println("Printing Designated Dpns To TunnelIp and ElanName cache "
                 + "(DesignatedDpnsToTunnelIpElanNameCache)");
         dhcpExternalTunnelManager.getDesignatedDpnsToTunnelIpElanNameCache().forEach(
index e50f163c845d69701d9a7de06165bf78db3941d5..ea952257943165d8498430a1bdc426b9e8a41c83 100644 (file)
@@ -8,8 +8,6 @@
 
 package org.opendaylight.netvirt.elan.internal;
 
-import static java.util.Collections.emptyList;
-
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.ListenableFuture;
 import java.util.ArrayList;
@@ -29,7 +27,6 @@ import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
 import org.opendaylight.genius.mdsalutil.MDSALUtil;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
 import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
-import org.opendaylight.netvirt.elan.ElanException;
 import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
 import org.opendaylight.netvirt.elan.utils.ElanConstants;
 import org.opendaylight.netvirt.elan.utils.ElanUtils;
@@ -154,14 +151,8 @@ public class ElanInstanceManager extends AsyncDataTreeChangeListenerBase<ElanIns
                     tx -> ElanUtils.updateOperationalDataStore(idManager, update, new ArrayList<>(), tx)),
                     LOG, "Error updating ELAN tag in ELAN instance");
             } else {
-                jobCoordinator.enqueueJob(elanName, () -> {
-                    try {
-                        return elanInterfaceManager.handleunprocessedElanInterfaces(update);
-                    } catch (ElanException e) {
-                        LOG.error("update() failed for ElanInstance: {}", identifier.toString(), e);
-                        return emptyList();
-                    }
-                }, ElanConstants.JOB_MAX_RETRIES);
+                jobCoordinator.enqueueJob(elanName, () -> elanInterfaceManager.handleunprocessedElanInterfaces(update),
+                    ElanConstants.JOB_MAX_RETRIES);
             }
         }
     }
index 0d0be420186737edbbd4df4c9b0fce9ad36b8dcb..83b04cfcde3df702c88402c04e0585fcd4d83382 100644 (file)
@@ -65,7 +65,6 @@ import org.opendaylight.genius.mdsalutil.matches.MatchTunnelId;
 import org.opendaylight.genius.utils.ServiceIndex;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
 import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
-import org.opendaylight.netvirt.elan.ElanException;
 import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
 import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
 import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayMulticastUtils;
@@ -615,7 +614,7 @@ public class ElanInterfaceManager extends AsyncDataTreeChangeListenerBase<ElanIn
         }), LOG, "Error procedding added ELAN interface");
     }
 
-    List<ListenableFuture<Void>> handleunprocessedElanInterfaces(ElanInstance elanInstance) throws ElanException {
+    List<ListenableFuture<Void>> handleunprocessedElanInterfaces(ElanInstance elanInstance) {
         List<ListenableFuture<Void>> futures = new ArrayList<>();
         Queue<ElanInterface> elanInterfaces = unProcessedElanInterfaces.get(elanInstance.getElanInstanceName());
         if (elanInterfaces == null || elanInterfaces.isEmpty()) {
@@ -631,7 +630,7 @@ public class ElanInterfaceManager extends AsyncDataTreeChangeListenerBase<ElanIn
     }
 
     void programRemoteDmacFlow(ElanInstance elanInstance, InterfaceInfo interfaceInfo,
-            WriteTransaction writeFlowGroupTx) throws ElanException {
+            WriteTransaction writeFlowGroupTx) {
         ElanDpnInterfacesList elanDpnInterfacesList = elanUtils
                 .getElanDpnInterfacesList(elanInstance.getElanInstanceName());
         List<DpnInterfaces> dpnInterfaceLists = null;
@@ -670,7 +669,7 @@ public class ElanInterfaceManager extends AsyncDataTreeChangeListenerBase<ElanIn
 
     @SuppressWarnings("checkstyle:ForbidCertainMethod")
     List<ListenableFuture<Void>> addElanInterface(ElanInterface elanInterface,
-            InterfaceInfo interfaceInfo, ElanInstance elanInstance) throws ElanException {
+            InterfaceInfo interfaceInfo, ElanInstance elanInstance) {
         Preconditions.checkNotNull(elanInstance, "elanInstance cannot be null");
         Preconditions.checkNotNull(interfaceInfo, "interfaceInfo cannot be null");
         Preconditions.checkNotNull(elanInterface, "elanInterface cannot be null");
@@ -767,8 +766,7 @@ public class ElanInterfaceManager extends AsyncDataTreeChangeListenerBase<ElanIn
 
     @SuppressWarnings("checkstyle:ForbidCertainMethod")
     List<ListenableFuture<Void>> setupEntriesForElanInterface(ElanInstance elanInstance,
-            ElanInterface elanInterface, InterfaceInfo interfaceInfo, boolean isFirstInterfaceInDpn)
-            throws ElanException {
+            ElanInterface elanInterface, InterfaceInfo interfaceInfo, boolean isFirstInterfaceInDpn) {
         String elanInstanceName = elanInstance.getElanInstanceName();
         String interfaceName = elanInterface.getName();
         WriteTransaction tx = broker.newWriteOnlyTransaction();
@@ -881,7 +879,7 @@ public class ElanInterfaceManager extends AsyncDataTreeChangeListenerBase<ElanIn
 
     private void installEntriesForElanInterface(ElanInstance elanInstance, ElanInterface elanInterface,
             InterfaceInfo interfaceInfo, boolean isFirstInterfaceInDpn, WriteTransaction tx,
-            WriteTransaction writeFlowGroupTx) throws ElanException {
+            WriteTransaction writeFlowGroupTx) {
         if (!isOperational(interfaceInfo)) {
             return;
         }
@@ -1111,7 +1109,7 @@ public class ElanInterfaceManager extends AsyncDataTreeChangeListenerBase<ElanIn
     // Install DMAC entry on dst DPN
     @SuppressWarnings("checkstyle:ForbidCertainMethod")
     public List<ListenableFuture<Void>> installDMacAddressTables(ElanInstance elanInfo, InterfaceInfo interfaceInfo,
-            BigInteger dstDpId) throws ElanException {
+            BigInteger dstDpId) {
         String interfaceName = interfaceInfo.getInterfaceName();
         ElanInterfaceMac elanInterfaceMac = elanUtils.getElanInterfaceMacByInterfaceName(interfaceName);
         if (elanInterfaceMac != null && elanInterfaceMac.getMacEntry() != null) {
@@ -1656,9 +1654,8 @@ public class ElanInterfaceManager extends AsyncDataTreeChangeListenerBase<ElanIn
      *            the external tunnel
      * @param intrf
      *            the interface
-     * @throws ElanException in case of issues creating the flow objects
      */
-    public void handleExternalTunnelStateEvent(ExternalTunnel externalTunnel, Interface intrf) throws ElanException {
+    public void handleExternalTunnelStateEvent(ExternalTunnel externalTunnel, Interface intrf) {
         if (!validateExternalTunnelStateEvent(externalTunnel, intrf)) {
             return;
         }
index 41306b692a2b8c63ad557eb2e70fa568ea60de15..eae199f0956d79c4f768416849bf4c47d1e6b293 100644 (file)
@@ -13,7 +13,6 @@ import javax.inject.Singleton;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.genius.datastoreutils.AsyncClusteredDataTreeChangeListenerBase;
-import org.opendaylight.netvirt.elan.ElanException;
 import org.opendaylight.netvirt.elan.utils.ElanClusterUtils;
 import org.opendaylight.netvirt.elan.utils.ElanUtils;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.Tunnel;
@@ -75,17 +74,13 @@ public class ElanInterfaceStateClusteredListener extends
 
                 elanClusterUtils.runOnlyInOwnerNode("external tunnel update", () -> {
                     LOG.debug("running external tunnel update job for interface {} added", interfaceName);
-                    try {
-                        handleExternalTunnelUpdate(interfaceName, intrf);
-                    } catch (ElanException e) {
-                        LOG.error("Failed to add Interface {}", identifier.toString());
-                    }
+                    handleExternalTunnelUpdate(interfaceName, intrf);
                 });
             }
         }
     }
 
-    private void handleExternalTunnelUpdate(String interfaceName, Interface update) throws ElanException {
+    private void handleExternalTunnelUpdate(String interfaceName, Interface update) {
         ExternalTunnel externalTunnel = elanUtils.getExternalTunnel(interfaceName, LogicalDatastoreType.CONFIGURATION);
         if (externalTunnel != null) {
             LOG.debug("handling external tunnel update event for ext device dst {}  src {} ",
index 46e2aacc4ca9dc1713270b2ee0670046c7ba9119..84b863a8752fee20808ce2812183203dc3c4dc25 100644 (file)
@@ -36,7 +36,6 @@ import org.opendaylight.genius.infra.TypedWriteTransaction;
 import org.opendaylight.genius.interfacemanager.globals.InterfaceInfo;
 import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.netvirt.elan.ElanException;
 import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
 import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
 import org.opendaylight.netvirt.elan.utils.ElanConstants;
@@ -127,7 +126,7 @@ public class ElanLearntVpnVipToPortListener extends
         }
 
         @Override
-        public List<ListenableFuture<Void>> call() throws Exception {
+        public List<ListenableFuture<Void>> call() {
             Optional<ElanInterface> elanInterface = elanInterfaceCache.get(interfaceName);
             if (!elanInterface.isPresent()) {
                 LOG.debug("ElanInterface Not present for interfaceName {} for add event", interfaceName);
@@ -142,7 +141,7 @@ public class ElanLearntVpnVipToPortListener extends
         }
 
         private void addMacEntryToDsAndSetupFlows(String elanName, TypedWriteTransaction<Operational> interfaceTx,
-                TypedWriteTransaction<Configuration> flowTx, int macTimeOut) throws ElanException {
+                TypedWriteTransaction<Configuration> flowTx, int macTimeOut) {
             LOG.trace("Adding mac address {} and interface name {} to ElanInterfaceForwardingEntries and "
                 + "ElanForwardingTables DS", macAddress, interfaceName);
             BigInteger timeStamp = new BigInteger(String.valueOf(System.currentTimeMillis()));
index 0206ee3336f2da009ada52cf95e9194c5d77ec0e..999887b2b82ae72a296d5cee32bcda6a5ad53e4a 100644 (file)
@@ -45,7 +45,7 @@ public class InterfaceAddWorkerOnElan implements Callable<List<ListenableFuture<
 
     @Override
     @SuppressWarnings("checkstyle:IllegalCatch")
-    public List<ListenableFuture<Void>> call() throws Exception {
+    public List<ListenableFuture<Void>> call() {
         try {
             return dataChangeListener.addElanInterface(elanInterface, interfaceInfo, elanInstance);
         } catch (RuntimeException e) {
index 36bc42e3789fc0b5507e8d264ce66110a18ea19e..68f8c11a6ba3cbe500249a346827dcd8eec12f7e 100644 (file)
@@ -44,7 +44,7 @@ public class InterfaceAddWorkerOnElanInterface implements Callable<List<Listenab
 
 
     @Override
-    public List<ListenableFuture<Void>> call() throws Exception {
+    public List<ListenableFuture<Void>> call() {
         LOG.info("Handling elan interface {} add for elan {} ", elanInterface.getName(),
                 elanInstance.getElanInstanceName());
         return dataChangeListener.setupEntriesForElanInterface(elanInstance, elanInterface, interfaceInfo,
index 98f74b4b7bf57f61b6f6456da0d2269c20b5b36b..1aebf23ce04e7a9c2e15677a5229844720a77f8d 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.netvirt.elan.l2gw.ha.handlers;
 
 import com.google.common.base.Optional;
-import java.util.concurrent.ExecutionException;
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
@@ -36,7 +35,7 @@ public class HAEventHandler implements IHAEventHandler {
                                          InstanceIdentifier<Node> connectedNodePath,
                                          InstanceIdentifier<Node> haNodePath,
                                          ReadWriteTransaction tx)
-            throws ReadFailedException, ExecutionException, InterruptedException {
+            throws ReadFailedException {
         if (haNodePath == null) {
             return;
         }
@@ -51,7 +50,7 @@ public class HAEventHandler implements IHAEventHandler {
                                            Optional<Node> haGlobalCfg,
                                            Optional<Node> haPSCfg,
                                            ReadWriteTransaction tx)
-            throws ReadFailedException, ExecutionException, InterruptedException {
+            throws ReadFailedException {
         if (haNodePath == null) {
             return;
         }
index d6a2315bd863aa8f45afcbbfc9e55084c0005801..e65caecb256e0a738b5dd307e5a0468defe252eb 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.netvirt.elan.l2gw.ha.handlers;
 
 import com.google.common.base.Optional;
-import java.util.concurrent.ExecutionException;
 
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
 import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
@@ -23,7 +22,7 @@ public interface IHAEventHandler {
                                   InstanceIdentifier<Node> connectedNodePath,
                                   InstanceIdentifier<Node> haNodePath,
                                   ReadWriteTransaction tx)
-            throws ReadFailedException, ExecutionException, InterruptedException;
+            throws ReadFailedException;
 
     void handleChildNodeReConnected(Node connectedNode,
                                     InstanceIdentifier<Node> connectedNodePath,
@@ -31,7 +30,7 @@ public interface IHAEventHandler {
                                     Optional<Node> haGlobalCfg,
                                     Optional<Node> haPSCfg,
                                     ReadWriteTransaction tx)
-            throws ReadFailedException, ExecutionException, InterruptedException;
+            throws ReadFailedException;
 
 
     void copyChildGlobalOpUpdateToHAParent(InstanceIdentifier<Node> haPath,
index ffd92a709311a284fddc4293e938f6ac11cfef17..7f0e01b2d65792e4fa50eb228c05b1bff300c299 100644 (file)
@@ -13,7 +13,6 @@ import com.google.common.base.Optional;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
-import java.util.concurrent.ExecutionException;
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
@@ -74,7 +73,7 @@ public class HAConfigNodeListener extends HwvtepNodeBaseListener {
     void onPsNodeUpdate(Node haPSUpdated,
             Node haPSOriginal,
             DataObjectModification<Node> mod,
-            ReadWriteTransaction tx) throws InterruptedException, ExecutionException, ReadFailedException {
+            ReadWriteTransaction tx) {
         //copy the ps node data to children
         String psId = haPSUpdated.getNodeId().getValue();
         Set<InstanceIdentifier<Node>> childSwitchIds = getPSChildrenIdsForHAPSNode(psId);
@@ -88,8 +87,7 @@ public class HAConfigNodeListener extends HwvtepNodeBaseListener {
                             Node haUpdated,
                             Node haOriginal,
                             DataObjectModification<Node> mod,
-                            ReadWriteTransaction tx)
-            throws InterruptedException, ExecutionException, ReadFailedException {
+                            ReadWriteTransaction tx) {
         Set<InstanceIdentifier<Node>> childNodeIds = getHwvtepNodeHACache().getChildrenForHANode(key);
         for (InstanceIdentifier<Node> haChildNodeId : childNodeIds) {
             haEventHandler.copyHAGlobalUpdateToChild(haChildNodeId, mod, tx);
index bdecafcd10e51039a959f5bce9fee1de0a58cdd5..bd10bbfce9465c7d8e390c578a459e81f224fa37 100644 (file)
@@ -95,7 +95,7 @@ public class HAOpNodeListener extends HwvtepNodeBaseListener {
                             Node updatedChildNode,
                             Node originalChildNode,
                             DataObjectModification<Node> mod,
-                            ReadWriteTransaction tx) throws ReadFailedException {
+                            ReadWriteTransaction tx) {
 
         String oldHAId = HwvtepHAUtil.getHAIdFromManagerOtherConfig(originalChildNode);
         if (!Strings.isNullOrEmpty(oldHAId)) { //was already ha child
@@ -168,7 +168,7 @@ public class HAOpNodeListener extends HwvtepNodeBaseListener {
     void onPsNodeUpdate(Node updatedChildPSNode,
             Node originalChildPSNode,
             DataObjectModification<Node> mod,
-            ReadWriteTransaction tx) throws ReadFailedException {
+            ReadWriteTransaction tx) {
         InstanceIdentifier<Node> childGlobalPath = HwvtepHAUtil.getGlobalNodePathFromPSNode(updatedChildPSNode);
         if (isNotHAChild(childGlobalPath)) {
             return;
index 1251064d614842e1792cc5e72bc013f8c8a12e0f..08fdae6422e2a9bce9ee0756b62e21b92904c6e0 100644 (file)
@@ -154,8 +154,7 @@ public abstract class HwvtepNodeBaseListener implements DataTreeChangeListener<N
     }
 
     private void processUpdatedNodes(Collection<DataTreeModification<Node>> changes,
-                                     ReadWriteTransaction tx)
-            throws ReadFailedException, ExecutionException, InterruptedException {
+                                     ReadWriteTransaction tx) {
         for (DataTreeModification<Node> change : changes) {
             final InstanceIdentifier<Node> key = change.getRootPath().getRootIdentifier();
             final DataObjectModification<Node> mod = change.getRootNode();
@@ -209,7 +208,7 @@ public abstract class HwvtepNodeBaseListener implements DataTreeChangeListener<N
 
     private void processDisconnectedNodes(Collection<DataTreeModification<Node>> changes,
                                           ReadWriteTransaction tx)
-            throws InterruptedException, ExecutionException, ReadFailedException {
+            throws ReadFailedException {
         for (DataTreeModification<Node> change : changes) {
             final InstanceIdentifier<Node> key = change.getRootPath().getRootIdentifier();
             final DataObjectModification<Node> mod = change.getRootNode();
@@ -295,14 +294,12 @@ public abstract class HwvtepNodeBaseListener implements DataTreeChangeListener<N
     }
 
     void onGlobalNodeUpdate(InstanceIdentifier<Node> key, Node updated, Node original,
-                            DataObjectModification<Node> mod, ReadWriteTransaction tx)
-            throws ReadFailedException, InterruptedException, ExecutionException {
+                            DataObjectModification<Node> mod, ReadWriteTransaction tx) {
 
     }
 
     void onPsNodeUpdate(Node updated, Node original,
-                        DataObjectModification<Node> mod, ReadWriteTransaction tx)
-            throws ReadFailedException, InterruptedException, ExecutionException {
+                        DataObjectModification<Node> mod, ReadWriteTransaction tx) {
 
     }
 
index c1f83b99a673f46ddb856f5cce28a987372aab97..b345a2ef9dcc836e415b8c1ce273b0df2cc6ac04 100644 (file)
@@ -50,7 +50,6 @@ 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.JdkFutures;
-import org.opendaylight.netvirt.elan.ElanException;
 import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
 import org.opendaylight.netvirt.elan.cache.ElanInstanceDpnsCache;
 import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
@@ -298,10 +297,9 @@ public class ElanL2GatewayUtils {
      *            the elan
      * @param interfaceName
      *            the interface name
-     * @throws ElanException in case of issues creating the flow objects
      */
     public void installL2gwDeviceMacsInDpn(BigInteger dpnId, NodeId l2gwDeviceNodeId, ElanInstance elan,
-            String interfaceName) throws ElanException {
+            String interfaceName) {
         L2GatewayDevice l2gwDevice = ElanL2GwCacheUtils.getL2GatewayDeviceFromCache(elan.getElanInstanceName(),
                 l2gwDeviceNodeId.getValue());
         if (l2gwDevice == null) {
@@ -323,10 +321,9 @@ public class ElanL2GatewayUtils {
      *            the elan
      * @param interfaceName
      *            the interface name
-     * @throws ElanException in case of issues creating the flow objects
      */
     public void installDmacFlowsOnDpn(BigInteger dpnId, L2GatewayDevice l2gwDevice, ElanInstance elan,
-            String interfaceName) throws ElanException {
+            String interfaceName) {
         String elanName = elan.getElanInstanceName();
 
         Collection<LocalUcastMacs> l2gwDeviceLocalMacs = l2gwDevice.getUcastLocalMacs();
@@ -350,10 +347,8 @@ public class ElanL2GatewayUtils {
      *            the elan
      * @param interfaceName
      *            the interface name
-     * @throws ElanException in case of issues creating the flow objects
      */
-    public void installElanL2gwDevicesLocalMacsInDpn(BigInteger dpnId, ElanInstance elan, String interfaceName)
-            throws ElanException {
+    public void installElanL2gwDevicesLocalMacsInDpn(BigInteger dpnId, ElanInstance elan, String interfaceName) {
         ConcurrentMap<String, L2GatewayDevice> elanL2GwDevicesFromCache = ElanL2GwCacheUtils
                 .getInvolvedL2GwDevices(elan.getElanInstanceName());
         if (elanL2GwDevicesFromCache != null) {
index 5e8453089028edec7f6a689bc5d69b16f64b36b5..8068ee67a2191ad4b3d16c8534e390ae6a8aa6f4 100644 (file)
@@ -22,7 +22,6 @@ import org.opendaylight.genius.mdsalutil.MDSALUtil;
 import org.opendaylight.genius.mdsalutil.MatchInfo;
 import org.opendaylight.genius.mdsalutil.NwConstants;
 import org.opendaylight.genius.utils.batching.ResourceBatchingManager;
-import org.opendaylight.netvirt.elan.ElanException;
 import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId;
@@ -123,11 +122,10 @@ public class ElanDmacUtils {
      *            the interface name
      *
      * @return the dmac flows
-     * @throws ElanException in case of issues creating the flow objects
      */
     public List<ListenableFuture<Void>> installDmacFlowsToExternalRemoteMac(BigInteger dpnId,
             String extDeviceNodeId, Long elanTag, Long vni, String macAddress, String displayName,
-            String interfaceName) throws ElanException {
+            String interfaceName) {
         synchronized (ElanUtils.getElanMacDPNKey(elanTag, macAddress, dpnId)) {
             Flow flow = buildDmacFlowForExternalRemoteMac(dpnId, extDeviceNodeId, elanTag, vni, macAddress,
                     displayName);
@@ -164,12 +162,10 @@ public class ElanDmacUtils {
      *            Indicates if flows must be installed or removed.
      * @param interfaceName
      *            the interface name
-     * @throws ElanException in case of issues creating the flow objects
      * @see org.opendaylight.genius.mdsalutil.MDSALUtil.MdsalOp
      */
     public void setupDmacFlowsToExternalRemoteMac(BigInteger dpId, String extNodeId, Long elanTag, Long vni,
-            String macAddress, String elanInstanceName, MDSALUtil.MdsalOp addOrRemove, String interfaceName)
-            throws ElanException {
+            String macAddress, String elanInstanceName, MDSALUtil.MdsalOp addOrRemove, String interfaceName) {
         if (addOrRemove == MDSALUtil.MdsalOp.CREATION_OP) {
             installDmacFlowsToExternalRemoteMac(dpId, extNodeId, elanTag, vni, macAddress, elanInstanceName,
                     interfaceName);
@@ -234,7 +230,7 @@ public class ElanDmacUtils {
 
     private List<ListenableFuture<Void>> installEtreeDmacFlowsToExternalRemoteMac(
             BigInteger dpnId, String extDeviceNodeId, Long elanTag,
-            Long vni, String macAddress, String displayName, String interfaceName) throws ElanException {
+            Long vni, String macAddress, String displayName, String interfaceName) {
         EtreeLeafTagName etreeLeafTag = elanEtreeUtils.getEtreeLeafTagByElanTag(elanTag);
         if (etreeLeafTag != null) {
             return Lists.newArrayList(
@@ -341,7 +337,7 @@ public class ElanDmacUtils {
 
     public List<ListenableFuture<Void>> installDmacFlowsToExternalRemoteMacInBatch(
             BigInteger dpnId, String extDeviceNodeId, Long elanTag, Long vni, String macAddress, String displayName,
-            String interfaceName) throws ElanException {
+            String interfaceName) {
 
         Flow flow = buildDmacFlowForExternalRemoteMac(dpnId, extDeviceNodeId, elanTag, vni, macAddress,
                 displayName);
@@ -359,7 +355,7 @@ public class ElanDmacUtils {
 
     private List<ListenableFuture<Void>> installEtreeDmacFlowsToExternalRemoteMacInBatch(
             BigInteger dpnId, String extDeviceNodeId, Long elanTag, Long vni, String macAddress, String displayName,
-            String interfaceName) throws ElanException {
+            String interfaceName) {
 
         EtreeLeafTagName etreeLeafTag = elanEtreeUtils.getEtreeLeafTagByElanTag(elanTag);
         if (etreeLeafTag != null) {
index 9128eaf7e3e0ab53f18a4dc2a2c8d25cfab833fc..a2aaacfb8de024fcd06861c19104b86e020c7b00 100755 (executable)
@@ -74,7 +74,6 @@ import org.opendaylight.genius.mdsalutil.packet.Ethernet;
 import org.opendaylight.genius.mdsalutil.packet.IPv4;
 import org.opendaylight.infrautils.utils.concurrent.JdkFutures;
 import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
-import org.opendaylight.netvirt.elan.ElanException;
 import org.opendaylight.netvirt.elan.arp.responder.ArpResponderUtil;
 import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
 import org.opendaylight.netvirt.elanmanager.api.ElanHelper;
@@ -620,11 +619,10 @@ public class ElanUtils {
      *            true if remote dmac flows should be configured as well
      * @param writeFlowGroupTx
      *            the flow group tx
-     * @throws ElanException in case of issues creating the flow objects
      */
     public void setupMacFlows(ElanInstance elanInfo, InterfaceInfo interfaceInfo,
                               long macTimeout, String macAddress, boolean configureRemoteFlows,
-                              WriteTransaction writeFlowGroupTx) throws ElanException {
+                              WriteTransaction writeFlowGroupTx) {
         synchronized (getElanMacDPNKey(elanInfo.getElanTag(), macAddress, interfaceInfo.getDpId())) {
             setupKnownSmacFlow(elanInfo, interfaceInfo, macTimeout, macAddress, mdsalManager,
                 writeFlowGroupTx);
@@ -634,7 +632,7 @@ public class ElanUtils {
     }
 
     public void setupDMacFlowOnRemoteDpn(ElanInstance elanInfo, InterfaceInfo interfaceInfo, BigInteger dstDpId,
-                                         String macAddress, WriteTransaction writeFlowTx) throws ElanException {
+                                         String macAddress, WriteTransaction writeFlowTx) {
         String elanInstanceName = elanInfo.getElanInstanceName();
         setupRemoteDmacFlow(dstDpId, interfaceInfo.getDpId(), interfaceInfo.getInterfaceTag(), elanInfo.getElanTag(),
                 macAddress, elanInstanceName, writeFlowTx, interfaceInfo.getInterfaceName(), elanInfo);
@@ -811,8 +809,7 @@ public class ElanUtils {
 
     private void setupOrigDmacFlows(ElanInstance elanInfo, InterfaceInfo interfaceInfo, String macAddress,
                                     boolean configureRemoteFlows, IMdsalApiManager mdsalApiManager,
-                                    WriteTransaction writeFlowGroupTx)
-                                    throws ElanException {
+                                    WriteTransaction writeFlowGroupTx) {
         BigInteger dpId = interfaceInfo.getDpId();
         String ifName = interfaceInfo.getInterfaceName();
         long ifTag = interfaceInfo.getInterfaceTag();
@@ -954,7 +951,7 @@ public class ElanUtils {
 
     public void setupRemoteDmacFlow(BigInteger srcDpId, BigInteger destDpId, int lportTag, long elanTag, String
             macAddress, String displayName, WriteTransaction writeFlowGroupTx, String interfaceName, ElanInstance
-            elanInstance) throws ElanException {
+            elanInstance) {
         if (interfaceManager.isExternalInterface(interfaceName)) {
             LOG.debug("Ignoring install remote DMAC {} flow on provider interface {} elan {}",
                     macAddress, interfaceName, elanInstance.getElanInstanceName());
index 510194b95b7d6f3af203d5b8d8e9430974446eb7..24fa94761cefd09c00ca407c1b5db104b6bcdd15 100644 (file)
@@ -59,7 +59,7 @@ public class VpnClusterEosBasedOwnershipDriver extends VpnClusterOwnershipDriver
 
     @Override
     @PreDestroy
-    public void close() throws Exception {
+    public void close() {
         if (registeredVpnEosListener != null) {
             registeredVpnEosListener.close();
         }
index 036a9c48969e5bd6587e7b1ade1bc839a604c003..db52c7e308ad710dd072d9018229bf7dda2db48e 100644 (file)
@@ -30,7 +30,7 @@ public class VpnClusterOwnershipDriverBase implements IVpnClusterOwnershipDriver
 
     @Override
     @PreDestroy
-    public void close() throws Exception {}
+    public void close() {}
 
     @Override
     public boolean amIOwner() {
index a1018bd70b439eae46933ac0319086e4843a71ce..3dbcf6c3f0725a92639141882bd83d721718c5d4 100644 (file)
@@ -41,7 +41,7 @@ public class VpnClusterShardBasedOwnershipDriver extends VpnClusterOwnershipDriv
 
     @Override
     @PreDestroy
-    public void close() throws Exception {
+    public void close() {
         LOG.info("{} closed", getClass().getSimpleName());
     }
 }
index 70d6aed4c4445f122184eb910835770c48287adb..934eaed0c4e0e03148ee8febf06a2fe1ee999dbe 100644 (file)
@@ -311,7 +311,7 @@ public class LearntVpnVipToPortEventProcessor
         }
 
         @Override
-        public List<ListenableFuture<Void>> call() throws Exception {
+        public List<ListenableFuture<Void>> call() {
             List<ListenableFuture<Void>> futures = new ArrayList<>();
             vpnUtil.removeMipAdjAndLearntIp(vpnName, interfaceName,  ipAddress);
             return futures;