Reduce SchemaContext updates on shutdown
authorTom Pantelis <tpanteli@brocade.com>
Mon, 18 May 2015 00:33:53 +0000 (20:33 -0400)
committerMoiz Raja <moraja@cisco.com>
Fri, 22 May 2015 15:58:14 +0000 (15:58 +0000)
commit825b3749d67dc20e9d1a423f15720bcdb1d6853b
tree7b19b6c7c22fbf49cae68bf28592970e93b181db
parenta7e5fe4e2b8e3c103a4cb14d81d8abb0b35031de
Reduce SchemaContext updates on shutdown

The GlobalBundleScanningSchemaServiceImpl sends out a ton (hundreds) of
SchemaContext updates on shutdown. This because the removedBundle method
calls tryToUpdateSchemaContext even for bundles that weren't tracked, ie
bundles w/o yang URLs. So I added a check`for # URLs > 0.

Change-Id: I203047f04ba5761c1927102b3cb0f2e309b6bf77
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
(cherry picked from commit bc312b3f54c8c089fdc2f2f2b8b8bb6903cca038)
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/GlobalBundleScanningSchemaServiceImpl.java