X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FDistributedDataStore.java;h=2ef8e5f449f8df564ae42943c6597224b832bcb4;hb=c222e37f2a0f0f3f6266242fbea2d3b018f4e6e3;hp=0c4fae0fc68c098e7f2f9e2daa4eba62828a1f20;hpb=d255fdd0b14660a22ff63771d954ac3fe5d0cb7e;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java index 0c4fae0fc6..2ef8e5f449 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java @@ -23,7 +23,7 @@ import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransactio import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionChain; import org.opendaylight.controller.sal.core.spi.data.DOMStoreWriteTransaction; import org.opendaylight.yangtools.concepts.ListenerRegistration; -import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.model.api.SchemaContextListener; @@ -61,7 +61,9 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener, Au Executors.newFixedThreadPool(10); public DistributedDataStore(ActorSystem actorSystem, String type, ClusterWrapper cluster, Configuration configuration) { - this(new ActorContext(actorSystem, actorSystem.actorOf(ShardManager.props(type, cluster, configuration), "shardmanager-" + type), configuration), type); + this(new ActorContext(actorSystem, actorSystem + .actorOf(ShardManager.props(type, cluster, configuration), + "shardmanager-" + type), cluster, configuration), type); } public DistributedDataStore(ActorContext actorContext, String type) { @@ -71,18 +73,18 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener, Au @Override - public >> ListenerRegistration registerChangeListener( - InstanceIdentifier path, L listener, + public >> ListenerRegistration registerChangeListener( + YangInstanceIdentifier path, L listener, AsyncDataBroker.DataChangeScope scope) { ActorRef dataChangeListenerActor = actorContext.getActorSystem().actorOf( - DataChangeListener.props(listener)); + DataChangeListener.props(schemaContext,listener,path )); String shardName = ShardStrategyFactory.getStrategy(path).findShard(path); Object result = actorContext.executeShardOperation(shardName, new RegisterChangeListener(path, dataChangeListenerActor.path(), - AsyncDataBroker.DataChangeScope.BASE).toSerializable(), + scope).toSerializable(), ActorContext.ASK_DURATION );