InventoryService caching and First-level Transaction Support
[netvirt.git] / ovsdb / src / main / java / org / opendaylight / ovsdb / plugin / ConnectionService.java
index 14189d20f48f32c5ceb9d0054838883c85bef76d..e94e8988b96043e222bc64ed7f5b316b88aea9c0 100755 (executable)
@@ -41,6 +41,17 @@ public class ConnectionService implements IPluginInConnectionService, IConnectio
     private static final Integer defaultOvsdbPort = 6632;
     ConcurrentMap<String, Connection> ovsdbConnections;
     List<ChannelHandler> handlers = null;
+    InventoryServiceInternal inventoryServiceInternal;
+
+    public void setInventoryServiceInternal(InventoryServiceInternal inventoryServiceInternal) {
+        this.inventoryServiceInternal = inventoryServiceInternal;
+    }
+
+    public void unsetInventoryServiceInternal(InventoryServiceInternal inventoryServiceInternal) {
+        if (this.inventoryServiceInternal == inventoryServiceInternal) {
+            this.inventoryServiceInternal = null;
+        }
+    }
 
     public void init() {
         ovsdbConnections = new ConcurrentHashMap<String, Connection>();