This change test-drives the new re-implementation, making sure we have a
user. An immediate advantage should be faster context convergence times.
Requires I3311a3f0251868f91c385d0291365934ccfb9ede in yangtools.
Change-Id: Ic2f07144043f456ab9821013c1d690904c9a791f
Signed-off-by: Robert Varga <rovarga@cisco.com>
import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
-import org.opendaylight.yangtools.yang.parser.impl.util.URLSchemaContextResolver;
+import org.opendaylight.yangtools.yang.parser.repo.URLSchemaContextResolver;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
private static final Logger LOG = LoggerFactory.getLogger(GlobalBundleScanningSchemaServiceImpl.class);
private final ListenerRegistry<SchemaContextListener> listeners = new ListenerRegistry<>();
private static final Logger LOG = LoggerFactory.getLogger(GlobalBundleScanningSchemaServiceImpl.class);
private final ListenerRegistry<SchemaContextListener> listeners = new ListenerRegistry<>();
- private final URLSchemaContextResolver contextResolver = new URLSchemaContextResolver();
+ private final URLSchemaContextResolver contextResolver = URLSchemaContextResolver.create("global-bundle");
private final BundleScanner scanner = new BundleScanner();
private final BundleContext context;
private final BundleScanner scanner = new BundleScanner();
private final BundleContext context;
if (starting) {
return;
}
if (starting) {
return;
}
- Optional<SchemaContext> schema = contextResolver.tryToUpdateSchemaContext();
+ Optional<SchemaContext> schema = contextResolver.getSchemaContext();
if(schema.isPresent()) {
updateContext(schema.get());
}
if(schema.isPresent()) {
updateContext(schema.get());
}