+ public Builder shardCommitQueueExpiryTimeoutInMillis(final long value) {
+ datastoreContext.shardCommitQueueExpiryTimeoutInMillis = value;
+ return this;
+ }
+
+ public Builder shardCommitQueueExpiryTimeoutInSeconds(final long value) {
+ datastoreContext.shardCommitQueueExpiryTimeoutInMillis = TimeUnit.MILLISECONDS.convert(
+ value, TimeUnit.SECONDS);
+ return this;
+ }
+
+ public Builder transactionDebugContextEnabled(final boolean value) {
+ datastoreContext.transactionDebugContextEnabled = value;
+ return this;
+ }
+
+ @Deprecated(forRemoval = true)
+ public Builder maxShardDataChangeExecutorPoolSize(final int newMaxShardDataChangeExecutorPoolSize) {
+ return this;
+ }
+
+ @Deprecated(forRemoval = true)
+ public Builder maxShardDataChangeExecutorQueueSize(final int newMaxShardDataChangeExecutorQueueSize) {
+ return this;
+ }
+
+ @Deprecated(forRemoval = true)
+ public Builder maxShardDataChangeListenerQueueSize(final int newMaxShardDataChangeListenerQueueSize) {
+ return this;
+ }
+
+ @Deprecated(forRemoval = true)
+ public Builder maxShardDataStoreExecutorQueueSize(final int newMaxShardDataStoreExecutorQueueSize) {
+ return this;
+ }
+
+ public Builder useTellBasedProtocol(final boolean value) {
+ datastoreContext.useTellBasedProtocol = value;
+ return this;
+ }
+
+ /**
+ * For unit tests only.
+ */
+ @VisibleForTesting
+ public Builder shardManagerPersistenceId(final String id) {
+ datastoreContext.shardManagerPersistenceId = id;
+ return this;
+ }
+
+ public Builder customRaftPolicyImplementation(final String customRaftPolicyImplementation) {
+ datastoreContext.setCustomRaftPolicyImplementation(customRaftPolicyImplementation);
+ return this;
+ }
+
+ @Deprecated
+ public Builder shardSnapshotChunkSize(final int shardSnapshotChunkSize) {
+ LOG.warn("The shard-snapshot-chunk-size configuration parameter is deprecated - "
+ + "use maximum-message-slice-size instead");
+ datastoreContext.setShardSnapshotChunkSize(shardSnapshotChunkSize);
+ return this;
+ }
+
+ public Builder maximumMessageSliceSize(final int maximumMessageSliceSize) {
+ datastoreContext.setMaximumMessageSliceSize(maximumMessageSliceSize);