Speed up GlobalBundleScanningSchemaServiceImpl close 81/27781/1
authorTom Pantelis <tpanteli@brocade.com>
Thu, 1 Oct 2015 21:43:24 +0000 (17:43 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Thu, 1 Oct 2015 21:52:01 +0000 (17:52 -0400)
commit8fdc757e235b7a6743ad97f7a6b0dfc63f2152c4
treee5a8c94fafd9663ff9ca4ea181558f7af0b090a5
parent7a2d5cb49eab242e10233e0218ee1906c13df901
Speed up GlobalBundleScanningSchemaServiceImpl close

On close, the GlobalBundleScanningSchemaServiceImpl closes the
BundleTracker which untracks all the bundles and notifies the listener
of removed bundles. This results in a call to tryToUpdateSchemaContext
which causes the remaining yang files to be re-parsed to build a new
SchemaContext. To prevent this extra processing on shutdown, I added
a "stopping" flag to elide tryToUpdateSchemaContext the same we do
with the "starting" flag.

Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Change-Id: I9f7c05277df9bf1ffaec1c699453020312aab203
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/GlobalBundleScanningSchemaServiceImpl.java