@@ -171,7 +171,7 @@ public static class AutoFollowPattern implements Writeable, ToXContentObject {
171171 public static final ParseField MAX_CONCURRENT_WRITE_BATCHES = new ParseField ("max_concurrent_write_batches" );
172172 public static final ParseField MAX_WRITE_BUFFER_SIZE = new ParseField ("max_write_buffer_size" );
173173 public static final ParseField MAX_RETRY_DELAY = new ParseField ("max_retry_delay" );
174- public static final ParseField IDLE_SHARD_RETRY_DELAY = new ParseField ("idle_shard_retry_delay " );
174+ public static final ParseField POLL_TIMEOUT = new ParseField ("poll_timeout " );
175175 private static final ParseField HEADERS = new ParseField ("headers" );
176176
177177 @ SuppressWarnings ("unchecked" )
@@ -193,8 +193,8 @@ public static class AutoFollowPattern implements Writeable, ToXContentObject {
193193 (p , c ) -> TimeValue .parseTimeValue (p .text (), MAX_RETRY_DELAY .getPreferredName ()),
194194 MAX_RETRY_DELAY , ObjectParser .ValueType .STRING );
195195 PARSER .declareField (ConstructingObjectParser .optionalConstructorArg (),
196- (p , c ) -> TimeValue .parseTimeValue (p .text (), IDLE_SHARD_RETRY_DELAY .getPreferredName ()),
197- IDLE_SHARD_RETRY_DELAY , ObjectParser .ValueType .STRING );
196+ (p , c ) -> TimeValue .parseTimeValue (p .text (), POLL_TIMEOUT .getPreferredName ()),
197+ POLL_TIMEOUT , ObjectParser .ValueType .STRING );
198198 PARSER .declareObject (ConstructingObjectParser .constructorArg (), (p , c ) -> p .mapStrings (), HEADERS );
199199 }
200200
@@ -206,7 +206,7 @@ public static class AutoFollowPattern implements Writeable, ToXContentObject {
206206 private final Integer maxConcurrentWriteBatches ;
207207 private final Integer maxWriteBufferSize ;
208208 private final TimeValue maxRetryDelay ;
209- private final TimeValue idleShardRetryDelay ;
209+ private final TimeValue pollTimeout ;
210210 private final Map <String , String > headers ;
211211
212212 public AutoFollowPattern (List <String > leaderIndexPatterns ,
@@ -217,7 +217,7 @@ public AutoFollowPattern(List<String> leaderIndexPatterns,
217217 Integer maxConcurrentWriteBatches ,
218218 Integer maxWriteBufferSize ,
219219 TimeValue maxRetryDelay ,
220- TimeValue idleShardRetryDelay ,
220+ TimeValue pollTimeout ,
221221 Map <String , String > headers ) {
222222 this .leaderIndexPatterns = leaderIndexPatterns ;
223223 this .followIndexPattern = followIndexPattern ;
@@ -227,7 +227,7 @@ public AutoFollowPattern(List<String> leaderIndexPatterns,
227227 this .maxConcurrentWriteBatches = maxConcurrentWriteBatches ;
228228 this .maxWriteBufferSize = maxWriteBufferSize ;
229229 this .maxRetryDelay = maxRetryDelay ;
230- this .idleShardRetryDelay = idleShardRetryDelay ;
230+ this .pollTimeout = pollTimeout ;
231231 this .headers = headers != null ? Collections .unmodifiableMap (headers ) : Collections .emptyMap ();
232232 }
233233
@@ -240,7 +240,7 @@ public AutoFollowPattern(List<String> leaderIndexPatterns,
240240 maxConcurrentWriteBatches = in .readOptionalVInt ();
241241 maxWriteBufferSize = in .readOptionalVInt ();
242242 maxRetryDelay = in .readOptionalTimeValue ();
243- idleShardRetryDelay = in .readOptionalTimeValue ();
243+ pollTimeout = in .readOptionalTimeValue ();
244244 this .headers = Collections .unmodifiableMap (in .readMap (StreamInput ::readString , StreamInput ::readString ));
245245 }
246246
@@ -284,8 +284,8 @@ public TimeValue getMaxRetryDelay() {
284284 return maxRetryDelay ;
285285 }
286286
287- public TimeValue getIdleShardRetryDelay () {
288- return idleShardRetryDelay ;
287+ public TimeValue getPollTimeout () {
288+ return pollTimeout ;
289289 }
290290
291291 public Map <String , String > getHeaders () {
@@ -302,7 +302,7 @@ public void writeTo(StreamOutput out) throws IOException {
302302 out .writeOptionalVInt (maxConcurrentWriteBatches );
303303 out .writeOptionalVInt (maxWriteBufferSize );
304304 out .writeOptionalTimeValue (maxRetryDelay );
305- out .writeOptionalTimeValue (idleShardRetryDelay );
305+ out .writeOptionalTimeValue (pollTimeout );
306306 out .writeMap (headers , StreamOutput ::writeString , StreamOutput ::writeString );
307307 }
308308
@@ -330,8 +330,8 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
330330 if (maxRetryDelay != null ) {
331331 builder .field (MAX_RETRY_DELAY .getPreferredName (), maxRetryDelay );
332332 }
333- if (idleShardRetryDelay != null ) {
334- builder .field (IDLE_SHARD_RETRY_DELAY .getPreferredName (), idleShardRetryDelay );
333+ if (pollTimeout != null ) {
334+ builder .field (POLL_TIMEOUT .getPreferredName (), pollTimeout );
335335 }
336336 builder .field (HEADERS .getPreferredName (), headers );
337337 return builder ;
@@ -355,7 +355,7 @@ public boolean equals(Object o) {
355355 Objects .equals (maxConcurrentWriteBatches , that .maxConcurrentWriteBatches ) &&
356356 Objects .equals (maxWriteBufferSize , that .maxWriteBufferSize ) &&
357357 Objects .equals (maxRetryDelay , that .maxRetryDelay ) &&
358- Objects .equals (idleShardRetryDelay , that .idleShardRetryDelay ) &&
358+ Objects .equals (pollTimeout , that .pollTimeout ) &&
359359 Objects .equals (headers , that .headers );
360360 }
361361
@@ -370,7 +370,7 @@ public int hashCode() {
370370 maxConcurrentWriteBatches ,
371371 maxWriteBufferSize ,
372372 maxRetryDelay ,
373- idleShardRetryDelay ,
373+ pollTimeout ,
374374 headers
375375 );
376376 }
0 commit comments