public void startNewDomDataBroker() {
checkState(executor != null, "Executor needs to be set");
- final InMemoryDOMDataStore operStore = new InMemoryDOMDataStore("OPER",
- MoreExecutors.newDirectExecutorService());
- final InMemoryDOMDataStore configStore = new InMemoryDOMDataStore("CFG",
- MoreExecutors.newDirectExecutorService());
+ final var operStore = new InMemoryDOMDataStore("OPER", MoreExecutors.newDirectExecutorService());
+ final var configStore = new InMemoryDOMDataStore("CFG", MoreExecutors.newDirectExecutorService());
newDatastores = ImmutableMap.<LogicalDatastoreType, DOMStore>builder()
.put(LogicalDatastoreType.OPERATIONAL, operStore)
.put(LogicalDatastoreType.CONFIGURATION, configStore)
newDOMDataBroker = new SerializedDOMDataBroker(newDatastores, executor);
- mockSchemaService.registerSchemaContextListener(configStore);
- mockSchemaService.registerSchemaContextListener(operStore);
+ mockSchemaService.registerSchemaContextListener(configStore::onModelContextUpdated);
+ mockSchemaService.registerSchemaContextListener(operStore::onModelContextUpdated);
}
public void startBindingDataBroker() {
}
public EffectiveModelContext getContext() {
- return mockSchemaService.getEffectiveModelContext();
+ return mockSchemaService.getGlobalContext();
}
public void start() {
private void startDomBroker() {
checkState(executor != null);
- domRouter = new DOMRpcRouter();
- mockSchemaService.registerSchemaContextListener(domRouter);
+ domRouter = new DOMRpcRouter(mockSchemaService);
}
public void startBindingNotificationBroker() {