Bug 508: Fixed concurrent conflicting commits by InventoryManager.
[controller.git] / opendaylight / md-sal / inventory-manager / src / main / java / org / opendaylight / controller / md / inventory / manager / FlowCapableInventoryProvider.xtend
index 1a66b3ba16316b4c5a1c92485e909cf061c3d398..ec8da8693fd5dd83379377786a6c3dc015797d34 100644 (file)
@@ -60,64 +60,4 @@ class FlowCapableInventoryProvider implements AutoCloseable {
         listenerRegistration?.close();
     }
     
-}
-
-class NodeChangeCommiter implements OpendaylightInventoryListener {
-
-    @Property
-    val FlowCapableInventoryProvider manager;
-
-    new(FlowCapableInventoryProvider manager) {
-        _manager = manager;
-    }
-
-    override onNodeConnectorRemoved(NodeConnectorRemoved connector) {
-        val ref = connector.nodeConnectorRef;
-
-        // Check path
-        val it = manager.startChange()
-        removeOperationalData(ref.value as InstanceIdentifier<? extends DataObject>);
-        commit()
-    }
-
-    override onNodeConnectorUpdated(NodeConnectorUpdated connector) {
-        val ref = connector.nodeConnectorRef;
-
-        val flowConnector = connector.getAugmentation(FlowCapableNodeConnectorUpdated);
-
-        val it = manager.startChange()
-        val data = new NodeConnectorBuilder(connector);
-        data.key = (new NodeConnectorKey(connector.id))
-        if (flowConnector != null) {
-            val augment = flowConnector.toInventoryAugment()
-            data.addAugmentation(FlowCapableNodeConnector, augment)
-        }
-
-        putOperationalData(ref.value as InstanceIdentifier<NodeConnector>, data.build());
-        commit()
-    }
-
-    override onNodeRemoved(NodeRemoved node) {
-        val ref = node.nodeRef;
-        val it = manager.startChange()
-
-        removeOperationalData(ref.value as InstanceIdentifier<? extends DataObject>);
-        commit()
-    }
-
-    override onNodeUpdated(NodeUpdated node) {
-        val ref = node.nodeRef;
-        val flowNode = node.getAugmentation(FlowCapableNodeUpdated);
-
-        val it = manager.startChange()
-        val data = new NodeBuilder(node);
-        data.key = (new NodeKey(node.id))
-        if (flowNode != null) {
-            val augment = flowNode.toInventoryAugment();
-            data.addAugmentation(FlowCapableNode, augment)
-        }
-
-        putOperationalData(ref.value as InstanceIdentifier<Node>, data.build())
-        commit()
-    }
-}
+}
\ No newline at end of file