@@ -48,7 +48,7 @@ public class ShardFollowTask implements XPackPlugin.XPackPersistentTaskParams {
4848 public static final ParseField MAX_BATCH_SIZE_IN_BYTES = new ParseField ("max_batch_size_in_bytes" );
4949 public static final ParseField MAX_CONCURRENT_WRITE_BATCHES = new ParseField ("max_concurrent_write_batches" );
5050 public static final ParseField MAX_WRITE_BUFFER_SIZE = new ParseField ("max_write_buffer_size" );
51- public static final ParseField RETRY_TIMEOUT = new ParseField ("retry_timeout " );
51+ public static final ParseField MAX_RETRY_DELAY = new ParseField ("max_retry_delay " );
5252 public static final ParseField IDLE_SHARD_RETRY_DELAY = new ParseField ("idle_shard_retry_delay" );
5353
5454 @ SuppressWarnings ("unchecked" )
@@ -71,8 +71,8 @@ public class ShardFollowTask implements XPackPlugin.XPackPersistentTaskParams {
7171 PARSER .declareInt (ConstructingObjectParser .constructorArg (), MAX_CONCURRENT_WRITE_BATCHES );
7272 PARSER .declareInt (ConstructingObjectParser .constructorArg (), MAX_WRITE_BUFFER_SIZE );
7373 PARSER .declareField (ConstructingObjectParser .constructorArg (),
74- (p , c ) -> TimeValue .parseTimeValue (p .text (), RETRY_TIMEOUT .getPreferredName ()),
75- RETRY_TIMEOUT , ObjectParser .ValueType .STRING );
74+ (p , c ) -> TimeValue .parseTimeValue (p .text (), MAX_RETRY_DELAY .getPreferredName ()),
75+ MAX_RETRY_DELAY , ObjectParser .ValueType .STRING );
7676 PARSER .declareField (ConstructingObjectParser .constructorArg (),
7777 (p , c ) -> TimeValue .parseTimeValue (p .text (), IDLE_SHARD_RETRY_DELAY .getPreferredName ()),
7878 IDLE_SHARD_RETRY_DELAY , ObjectParser .ValueType .STRING );
@@ -87,13 +87,13 @@ public class ShardFollowTask implements XPackPlugin.XPackPersistentTaskParams {
8787 private final long maxBatchSizeInBytes ;
8888 private final int maxConcurrentWriteBatches ;
8989 private final int maxWriteBufferSize ;
90- private final TimeValue retryTimeout ;
90+ private final TimeValue maxRetryDelay ;
9191 private final TimeValue idleShardRetryDelay ;
9292 private final Map <String , String > headers ;
9393
9494 ShardFollowTask (String leaderClusterAlias , ShardId followShardId , ShardId leaderShardId , int maxBatchOperationCount ,
9595 int maxConcurrentReadBatches , long maxBatchSizeInBytes , int maxConcurrentWriteBatches ,
96- int maxWriteBufferSize , TimeValue retryTimeout , TimeValue idleShardRetryDelay , Map <String , String > headers ) {
96+ int maxWriteBufferSize , TimeValue maxRetryDelay , TimeValue idleShardRetryDelay , Map <String , String > headers ) {
9797 this .leaderClusterAlias = leaderClusterAlias ;
9898 this .followShardId = followShardId ;
9999 this .leaderShardId = leaderShardId ;
@@ -102,7 +102,7 @@ public class ShardFollowTask implements XPackPlugin.XPackPersistentTaskParams {
102102 this .maxBatchSizeInBytes = maxBatchSizeInBytes ;
103103 this .maxConcurrentWriteBatches = maxConcurrentWriteBatches ;
104104 this .maxWriteBufferSize = maxWriteBufferSize ;
105- this .retryTimeout = retryTimeout ;
105+ this .maxRetryDelay = maxRetryDelay ;
106106 this .idleShardRetryDelay = idleShardRetryDelay ;
107107 this .headers = headers != null ? Collections .unmodifiableMap (headers ) : Collections .emptyMap ();
108108 }
@@ -116,7 +116,7 @@ public ShardFollowTask(StreamInput in) throws IOException {
116116 this .maxBatchSizeInBytes = in .readVLong ();
117117 this .maxConcurrentWriteBatches = in .readVInt ();
118118 this .maxWriteBufferSize = in .readVInt ();
119- this .retryTimeout = in .readTimeValue ();
119+ this .maxRetryDelay = in .readTimeValue ();
120120 this .idleShardRetryDelay = in .readTimeValue ();
121121 this .headers = Collections .unmodifiableMap (in .readMap (StreamInput ::readString , StreamInput ::readString ));
122122 }
@@ -153,8 +153,8 @@ public long getMaxBatchSizeInBytes() {
153153 return maxBatchSizeInBytes ;
154154 }
155155
156- public TimeValue getRetryTimeout () {
157- return retryTimeout ;
156+ public TimeValue getMaxRetryDelay () {
157+ return maxRetryDelay ;
158158 }
159159
160160 public TimeValue getIdleShardRetryDelay () {
@@ -184,7 +184,7 @@ public void writeTo(StreamOutput out) throws IOException {
184184 out .writeVLong (maxBatchSizeInBytes );
185185 out .writeVInt (maxConcurrentWriteBatches );
186186 out .writeVInt (maxWriteBufferSize );
187- out .writeTimeValue (retryTimeout );
187+ out .writeTimeValue (maxRetryDelay );
188188 out .writeTimeValue (idleShardRetryDelay );
189189 out .writeMap (headers , StreamOutput ::writeString , StreamOutput ::writeString );
190190 }
@@ -210,7 +210,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
210210 builder .field (MAX_BATCH_SIZE_IN_BYTES .getPreferredName (), maxBatchSizeInBytes );
211211 builder .field (MAX_CONCURRENT_WRITE_BATCHES .getPreferredName (), maxConcurrentWriteBatches );
212212 builder .field (MAX_WRITE_BUFFER_SIZE .getPreferredName (), maxWriteBufferSize );
213- builder .field (RETRY_TIMEOUT .getPreferredName (), retryTimeout .getStringRep ());
213+ builder .field (MAX_RETRY_DELAY .getPreferredName (), maxRetryDelay .getStringRep ());
214214 builder .field (IDLE_SHARD_RETRY_DELAY .getPreferredName (), idleShardRetryDelay .getStringRep ());
215215 builder .field (HEADERS .getPreferredName (), headers );
216216 return builder .endObject ();
@@ -229,15 +229,15 @@ public boolean equals(Object o) {
229229 maxConcurrentWriteBatches == that .maxConcurrentWriteBatches &&
230230 maxBatchSizeInBytes == that .maxBatchSizeInBytes &&
231231 maxWriteBufferSize == that .maxWriteBufferSize &&
232- Objects .equals (retryTimeout , that .retryTimeout ) &&
232+ Objects .equals (maxRetryDelay , that .maxRetryDelay ) &&
233233 Objects .equals (idleShardRetryDelay , that .idleShardRetryDelay ) &&
234234 Objects .equals (headers , that .headers );
235235 }
236236
237237 @ Override
238238 public int hashCode () {
239239 return Objects .hash (leaderClusterAlias , followShardId , leaderShardId , maxBatchOperationCount , maxConcurrentReadBatches ,
240- maxConcurrentWriteBatches , maxBatchSizeInBytes , maxWriteBufferSize , retryTimeout , idleShardRetryDelay , headers );
240+ maxConcurrentWriteBatches , maxBatchSizeInBytes , maxWriteBufferSize , maxRetryDelay , idleShardRetryDelay , headers );
241241 }
242242
243243 public String toString () {
0 commit comments