+
+ private void registerDataStoreUpdateListener(DataBrokerService dbs) {
+ // FIXME: the below should be broken out into StatisticsUpdateHandler
+
+ //Register for flow updates
+ InstanceIdentifier<? extends DataObject> pathFlow = InstanceIdentifier.builder(Nodes.class).child(Node.class)
+ .augmentation(FlowCapableNode.class)
+ .child(Table.class)
+ .child(Flow.class).toInstance();
+ dbs.registerDataChangeListener(pathFlow, statsUpdateHandler);
+
+ //Register for meter updates
+ InstanceIdentifier<? extends DataObject> pathMeter = InstanceIdentifier.builder(Nodes.class).child(Node.class)
+ .augmentation(FlowCapableNode.class)
+ .child(Meter.class).toInstance();
+
+ dbs.registerDataChangeListener(pathMeter, statsUpdateHandler);
+
+ //Register for group updates
+ InstanceIdentifier<? extends DataObject> pathGroup = InstanceIdentifier.builder(Nodes.class).child(Node.class)
+ .augmentation(FlowCapableNode.class)
+ .child(Group.class).toInstance();
+ dbs.registerDataChangeListener(pathGroup, statsUpdateHandler);
+
+ //Register for queue updates
+ InstanceIdentifier<? extends DataObject> pathQueue = InstanceIdentifier.builder(Nodes.class).child(Node.class)
+ .child(NodeConnector.class)
+ .augmentation(FlowCapableNodeConnector.class)
+ .child(Queue.class).toInstance();
+ dbs.registerDataChangeListener(pathQueue, statsUpdateHandler);
+ }
+