X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=dom%2Fmdsal-dom-inmemory-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fmdsal%2Fdom%2Fstore%2Finmemory%2FInMemoryDOMDataStore.java;h=6ed525f1ae0323240b78a23e06cb687dbd064f8e;hb=11408d627adca7eb71ac956c3ad01f75b6b91596;hp=118bcdbd81d1cd369377434eb10d646a7753eea0;hpb=78a6b28ae30c1d5660eea95a013d7e072ce5e954;p=mdsal.git diff --git a/dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataStore.java b/dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataStore.java index 118bcdbd81..6ed525f1ae 100644 --- a/dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataStore.java +++ b/dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataStore.java @@ -27,32 +27,27 @@ import org.opendaylight.mdsal.dom.spi.store.SnapshotBackedWriteTransaction.Trans import org.opendaylight.yangtools.concepts.Identifiable; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.util.ExecutorServiceUtil; -import org.opendaylight.yangtools.util.concurrent.QueuedNotificationManager; +import org.opendaylight.yangtools.util.concurrent.EqualityQueuedNotificationManager; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeConfiguration; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException; -import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; -import org.opendaylight.yangtools.yang.model.api.SchemaContextListener; +import org.opendaylight.yangtools.yang.data.tree.api.DataTree; +import org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidate; +import org.opendaylight.yangtools.yang.data.tree.api.DataTreeConfiguration; +import org.opendaylight.yangtools.yang.data.tree.api.DataTreeModification; +import org.opendaylight.yangtools.yang.data.tree.api.DataTreeSnapshot; +import org.opendaylight.yangtools.yang.data.tree.api.DataValidationFailedException; +import org.opendaylight.yangtools.yang.data.tree.impl.di.InMemoryDataTreeFactory; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * In-memory DOM Data Store. - * - *

- * Implementation of {@link DOMStore} which uses {@link DataTree} and other - * classes such as {@link SnapshotBackedWriteTransaction}. - * {@link org.opendaylight.mdsal.dom.spi.store.SnapshotBackedReadTransaction} to implement {@link DOMStore} - * contract. - * + * In-memory DOM Data Store. Implementation of {@link DOMStore} which uses {@link DataTree} and other classes such as + * {@link SnapshotBackedWriteTransaction}. + * {@link org.opendaylight.mdsal.dom.spi.store.SnapshotBackedReadTransaction} to implement {@link DOMStore} contract. */ public class InMemoryDOMDataStore extends TransactionReadyPrototype implements DOMStore, - Identifiable, SchemaContextListener, AutoCloseable, DOMStoreTreeChangePublisher { + Identifiable, EffectiveModelContextListener, AutoCloseable, DOMStoreTreeChangePublisher { private static final Logger LOG = LoggerFactory.getLogger(InMemoryDOMDataStore.class); private final AtomicLong txCounter = new AtomicLong(0); @@ -89,11 +84,11 @@ public class InMemoryDOMDataStore extends TransactionReadyPrototype impl this.dataChangeListenerExecutor = requireNonNull(dataChangeListenerExecutor); this.debugTransactions = debugTransactions; dataTree = new InMemoryDataTreeFactory().create(config); - changePublisher = new InMemoryDOMStoreTreeChangePublisher(this.dataChangeListenerExecutor, + changePublisher = new InMemoryDOMStoreTreeChangePublisher("name", this.dataChangeListenerExecutor, maxDataChangeListenerQueueSize); } - public QueuedNotificationManager getDataChangeListenerNotificationManager() { + public EqualityQueuedNotificationManager getDataChangeListenerNotificationManager() { return changePublisher.getNotificationManager(); } @@ -130,8 +125,8 @@ public class InMemoryDOMDataStore extends TransactionReadyPrototype impl } @Override - public synchronized void onGlobalContextUpdated(final SchemaContext ctx) { - dataTree.setSchemaContext(ctx); + public synchronized void onModelContextUpdated(final EffectiveModelContext newModelContext) { + dataTree.setEffectiveModelContext(newModelContext); } @SuppressWarnings("checkstyle:IllegalCatch")