BUG-5280: split DistributedDataStore
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / DatastoreContext.java
index a81806bc1086b66ff4400ced5e6d5355dc2be30a..e889f0a9b3d906dee5918dd068625410b2436b73 100644 (file)
@@ -76,6 +76,7 @@ public class DatastoreContext {
     private int shardBatchedModificationCount = DEFAULT_SHARD_BATCHED_MODIFICATION_COUNT;
     private boolean writeOnlyTransactionOptimizationsEnabled = true;
     private long shardCommitQueueExpiryTimeoutInMillis = DEFAULT_SHARD_COMMIT_QUEUE_EXPIRY_TIMEOUT_IN_MS;
+    private boolean useTellBasedProtocol = false;
     private boolean transactionDebugContextEnabled = false;
     private String shardManagerPersistenceId;
 
@@ -113,6 +114,7 @@ public class DatastoreContext {
         this.shardCommitQueueExpiryTimeoutInMillis = other.shardCommitQueueExpiryTimeoutInMillis;
         this.transactionDebugContextEnabled = other.transactionDebugContextEnabled;
         this.shardManagerPersistenceId = other.shardManagerPersistenceId;
+        this.useTellBasedProtocol = other.useTellBasedProtocol;
 
         setShardJournalRecoveryLogBatchSize(other.raftConfig.getJournalRecoveryLogBatchSize());
         setSnapshotBatchCount(other.raftConfig.getSnapshotBatchCount());
@@ -258,6 +260,10 @@ public class DatastoreContext {
         return transactionDebugContextEnabled;
     }
 
+    public boolean isUseTellBasedProtocol() {
+        return useTellBasedProtocol;
+    }
+
     public int getShardSnapshotChunkSize() {
         return raftConfig.getSnapshotChunkSize();
     }
@@ -471,6 +477,11 @@ public class DatastoreContext {
             return this;
         }
 
+        public Builder useTellBasedProtocol(boolean value) {
+            datastoreContext.useTellBasedProtocol = value;
+            return this;
+        }
+
         /**
          * For unit tests only.
          */