X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=ovsdb%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fovsdb%2Fplugin%2FInventoryService.java;fp=ovsdb%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fovsdb%2Fplugin%2FInventoryService.java;h=17bfa81dfcb29829266d3f0dee11776f00a54f42;hb=28bab6d2072e8170d1ecd31d55535edc66b517b3;hp=66a69a501d23ac6623ce32b3b396854dfe8a8156;hpb=7c495d2fb9bd587de119e4a7eab94897805baee5;p=ovsdb.git diff --git a/ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/InventoryService.java b/ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/InventoryService.java index 66a69a501..17bfa81df 100644 --- a/ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/InventoryService.java +++ b/ovsdb/src/main/java/org/opendaylight/ovsdb/plugin/InventoryService.java @@ -56,7 +56,7 @@ public class InventoryService implements IPluginInInventoryService, InventorySer new CopyOnWriteArraySet(); private ConcurrentMap> nodeProps; private ConcurrentMap> nodeConnectorProps; - private Map dbCache = Maps.newHashMap(); + private ConcurrentMap dbCache = Maps.newConcurrentMap(); private ScheduledExecutorService executor; /** @@ -126,7 +126,7 @@ public class InventoryService implements IPluginInInventoryService, InventorySer @Override - public Map>> getCache(Node n) { + public ConcurrentMap>> getCache(Node n) { NodeDB db = dbCache.get(n); if (db == null) return null; return db.getTableCache(); @@ -134,7 +134,7 @@ public class InventoryService implements IPluginInInventoryService, InventorySer @Override - public Map> getTableCache(Node n, String tableName) { + public ConcurrentMap> getTableCache(Node n, String tableName) { NodeDB db = dbCache.get(n); if (db == null) return null; return db.getTableCache(tableName);