Bug 7445: Improve the performance on bulk create.
[netvirt.git] / openstack / net-virt / src / main / java / org / opendaylight / netvirt / openstack / netvirt / impl / NeutronL3Adapter.java
index 0b5231ce0a327123649db835a4fdbbd9b4df1a17..162b3c5cf4e7d7cbed36d4903ccbb9329cf60aa6 100644 (file)
@@ -1633,6 +1633,17 @@ public class NeutronL3Adapter extends AbstractHandler implements GatewayMacResol
         }
     }
 
+    public NeutronPort getPortPreferablyFromCleanupCache(String portUuid) {
+        NeutronPort port = getPortFromCleanupCache(portUuid);
+        if (port == null) {
+            port = neutronPortCache.getPort(portUuid);
+            if (port == null) {
+                LOG.warn("In getPortPreferablyFromCleanupCache no neutron port found:  portUuid: {}", portUuid);
+            }
+        }
+        return port;
+    }
+
     public Map<String, NeutronNetwork> getNetworkCleanupCache() {
         return this.networkCleanupCache;
     }