BUG-5280: log a message when tell-based protocol is active
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / DistributedDataStoreFactory.java
index 8ecb1df70a0c436da6a859f0f105b5e7a2482c9c..e5b6f695474487782ee31887ce9ffba0ca53afe7 100644 (file)
@@ -38,9 +38,15 @@ public class DistributedDataStoreFactory {
         ClusterWrapper clusterWrapper = new ClusterWrapperImpl(actorSystem);
         DatastoreContextFactory contextFactory = introspector.newContextFactory();
 
-        final AbstractDataStore dataStore = datastoreContext.isUseTellBasedProtocol()
-                ? new ClientBackedDataStore(actorSystem, clusterWrapper, config, contextFactory, restoreFromSnapshot) :
-                    new DistributedDataStore(actorSystem, clusterWrapper, config, contextFactory, restoreFromSnapshot);
+        final AbstractDataStore dataStore;
+        if (datastoreContext.isUseTellBasedProtocol()) {
+            dataStore = new ClientBackedDataStore(actorSystem, clusterWrapper, config, contextFactory,
+                restoreFromSnapshot);
+            LOG.info("Data store {} is using tell-based protocol", datastoreContext.getDataStoreName());
+        } else {
+            dataStore = new DistributedDataStore(actorSystem, clusterWrapper, config, contextFactory,
+                restoreFromSnapshot);
+        }
 
         overlay.setListener(dataStore);