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=0a137e07df43a1bb7ca2fb3e854d7f63adfd46a3;hb=4e0489db3a8991c00b55aa44af0cf65f15aea8cc;hp=b97164839277279e35479ea8f69b5cd8c459d418;hpb=287b1d1ecec3264c192b1007019bfcadf6cb4311;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 b971648392..0a137e07df 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 @@ -46,7 +46,7 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener, Au private static final Logger LOG = LoggerFactory.getLogger(DistributedDataStore.class); private final ActorContext actorContext; - private final ShardContext shardContext; + private final DatastoreContext datastoreContext; public DistributedDataStore(ActorSystem actorSystem, String type, ClusterWrapper cluster, Configuration configuration, DistributedDataStoreProperties dataStoreProperties) { @@ -60,7 +60,7 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener, Au LOG.info("Creating ShardManager : {}", shardManagerId); - shardContext = new ShardContext(InMemoryDOMDataStoreConfigProperties.create( + datastoreContext = new DatastoreContext(InMemoryDOMDataStoreConfigProperties.create( dataStoreProperties.getMaxShardDataChangeExecutorPoolSize(), dataStoreProperties.getMaxShardDataChangeExecutorQueueSize(), dataStoreProperties.getMaxShardDataChangeListenerQueueSize()), @@ -70,13 +70,15 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener, Au actorContext = new ActorContext( actorSystem, actorSystem.actorOf( - ShardManager.props(type, cluster, configuration, shardContext). + ShardManager.props(type, cluster, configuration, datastoreContext). withMailbox(ActorContext.MAILBOX), shardManagerId ), cluster, configuration); + + actorContext.setOperationTimeout(dataStoreProperties.getOperationTimeoutInSeconds()); } public DistributedDataStore(ActorContext actorContext) { this.actorContext = Preconditions.checkNotNull(actorContext, "actorContext should not be null"); - this.shardContext = new ShardContext(); + this.datastoreContext = new DatastoreContext(); } @@ -98,8 +100,7 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener, Au String shardName = ShardStrategyFactory.getStrategy(path).findShard(path); Object result = actorContext.executeLocalShardOperation(shardName, - new RegisterChangeListener(path, dataChangeListenerActor.path(), scope), - ActorContext.ASK_DURATION); + new RegisterChangeListener(path, dataChangeListenerActor.path(), scope)); if (result != null) { RegisterChangeListenerReply reply = (RegisterChangeListenerReply) result;