Bulk merge of l2gw changes
[netvirt.git] / elanmanager / api / src / main / java / org / opendaylight / netvirt / elanmanager / utils / ElanL2GwCacheUtils.java
index 8f314e4c1615e987a74885268ede9e1ab0690d1d..9e0f622e14622f9615f7e94745119b28fb73b824 100644 (file)
@@ -11,8 +11,6 @@ import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
 import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.Map.Entry;
 import java.util.Set;
@@ -55,9 +53,9 @@ public final class ElanL2GwCacheUtils {
         return deviceMap == null ? null : deviceMap.get(l2gwDeviceNodeId);
     }
 
-    public static Collection<L2GatewayDevice> getInvolvedL2GwDevices(String elanName) {
+    public static ConcurrentMap<String, L2GatewayDevice> getInvolvedL2GwDevices(String elanName) {
         ConcurrentMap<String, L2GatewayDevice> result = CACHES.getIfPresent(elanName);
-        return result == null ? Collections.emptyList() : result.values();
+        return result == null ? new ConcurrentHashMap<>() : result;
     }
 
     public static Set<Entry<String, ConcurrentMap<String, L2GatewayDevice>>> getCaches() {