- bundleTracker.close();
- // FIXME: Add listeners.close();
-
- }
-
- private synchronized boolean tryToUpdateState(Collection<URL> changedURLs, Multimap<Bundle, URL> proposedNewState,
- boolean adding) {
- Preconditions.checkArgument(!changedURLs.isEmpty(), "No change can occur when no URLs are changed");
-
- try {
- // consistent state
- // merge into
- SchemaContext snapshot = createSnapshot(parser, proposedNewState);
- consistentBundlesToYangURLs.clear();
- consistentBundlesToYangURLs.putAll(proposedNewState);
- inconsistentBundlesToYangURLs.clear();
- // update cache
- updateCache(snapshot);
- logger.info("SchemaService updated to new consistent state");
- logger.trace("SchemaService updated to new consistent state containing {}", consistentBundlesToYangURLs);
-
- // notifyListeners(changedURLs, adding);
- return true;
- } catch (Exception e) {
- // inconsistent state
- logger.debug(
- "SchemaService is falling back on last consistent state containing {}, inconsistent yang files {}",
- consistentBundlesToYangURLs, inconsistentBundlesToYangURLs, e);
- return false;