Bug 1608: Make ActorContext ASK_DURATION configurable
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / DistributedDataStore.java
index 202ced9a26512047f57ee8ad2b0ced7e61366771..0a137e07df43a1bb7ca2fb3e854d7f63adfd46a3 100644 (file)
@@ -72,6 +72,8 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener, Au
                     actorSystem, actorSystem.actorOf(
                         ShardManager.props(type, cluster, configuration, datastoreContext).
                             withMailbox(ActorContext.MAILBOX), shardManagerId ), cluster, configuration);
+
+        actorContext.setOperationTimeout(dataStoreProperties.getOperationTimeoutInSeconds());
     }
 
     public DistributedDataStore(ActorContext actorContext) {
@@ -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;