Speed up OsgiBundleScanningSchemaService close 86/56186/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 27 Apr 2017 16:20:53 +0000 (18:20 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 27 Apr 2017 16:20:53 +0000 (18:20 +0200)
commitb0a11d8bb72e2b74f64ca1dbd6d981cf3a70c8ea
treef10e13b7bb5b4945a5c1b69ed0a292c151092391
parent676a097cc462ac0b22b2c05a2598e5445d13dab1
Speed up OsgiBundleScanningSchemaService close

On close, the OsgiBundleScanningSchemaService 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.

Change-Id: I9f7c05277df9bf1ffaec1c699453020312aab203
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
dom/mdsal-dom-broker/src/main/java/org/opendaylight/mdsal/dom/broker/osgi/OsgiBundleScanningSchemaService.java