X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FAbstractDataStore.java;h=477e05bcc6ecb7c92d1bda3e22cd28c52def06fd;hp=c0bb8662babccd23538eed8bce9f6378e7f2636f;hb=08269ac33356663d75f0df8cc54936eac5553e7b;hpb=149feb98f151186975fe42bab5853e05aafd4b51 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractDataStore.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractDataStore.java index c0bb8662ba..477e05bcc6 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractDataStore.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractDataStore.java @@ -33,6 +33,7 @@ import org.opendaylight.controller.cluster.datastore.utils.Dispatchers; import org.opendaylight.controller.cluster.datastore.utils.PrimaryShardInfoFutureCache; import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker; import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeListener; +import org.opendaylight.controller.md.sal.dom.api.ClusteredDOMDataTreeChangeListener; import org.opendaylight.controller.md.sal.dom.api.DOMDataTreeChangeListener; import org.opendaylight.controller.sal.core.spi.data.DOMStoreTreeChangePublisher; import org.opendaylight.mdsal.dom.api.DOMDataTreeCommitCohort; @@ -282,8 +283,7 @@ public abstract class AbstractDataStore implements DistributedDataStoreInterface for (int i = 0; i < 100; i++) { try { - return actorSystem.actorOf(creator.props().withDispatcher(shardDispatcher).withMailbox( - ActorContext.BOUNDED_MAILBOX), shardManagerId); + return actorSystem.actorOf(creator.props().withDispatcher(shardDispatcher), shardManagerId); } catch (Exception e) { lastException = e; Uninterruptibles.sleepUninterruptibly(100, TimeUnit.MILLISECONDS); @@ -315,7 +315,10 @@ public abstract class AbstractDataStore implements DistributedDataStoreInterface delegate,shardLookup, shardName, insideShard); final DataTreeChangeListenerProxy listenerRegistrationProxy = - new DataTreeChangeListenerProxy<>(actorContext, delegate::onDataTreeChanged, insideShard); + new DataTreeChangeListenerProxy<>(actorContext, + // wrap this in the ClusteredDOMDataTreeChangeLister interface + // since we always want clustered registration + (ClusteredDOMDataTreeChangeListener) delegate::onDataTreeChanged, insideShard); listenerRegistrationProxy.init(shardName); return (ListenerRegistration) listenerRegistrationProxy;