@@ -171,7 +171,7 @@ public static class AutoFollowPattern implements Writeable, ToXContentObject {
171
171
public static final ParseField MAX_CONCURRENT_WRITE_BATCHES = new ParseField ("max_concurrent_write_batches" );
172
172
public static final ParseField MAX_WRITE_BUFFER_SIZE = new ParseField ("max_write_buffer_size" );
173
173
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 " );
175
175
private static final ParseField HEADERS = new ParseField ("headers" );
176
176
177
177
@ SuppressWarnings ("unchecked" )
@@ -193,8 +193,8 @@ public static class AutoFollowPattern implements Writeable, ToXContentObject {
193
193
(p , c ) -> TimeValue .parseTimeValue (p .text (), MAX_RETRY_DELAY .getPreferredName ()),
194
194
MAX_RETRY_DELAY , ObjectParser .ValueType .STRING );
195
195
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 );
198
198
PARSER .declareObject (ConstructingObjectParser .constructorArg (), (p , c ) -> p .mapStrings (), HEADERS );
199
199
}
200
200
@@ -206,7 +206,7 @@ public static class AutoFollowPattern implements Writeable, ToXContentObject {
206
206
private final Integer maxConcurrentWriteBatches ;
207
207
private final Integer maxWriteBufferSize ;
208
208
private final TimeValue maxRetryDelay ;
209
- private final TimeValue idleShardRetryDelay ;
209
+ private final TimeValue pollTimeout ;
210
210
private final Map <String , String > headers ;
211
211
212
212
public AutoFollowPattern (List <String > leaderIndexPatterns ,
@@ -217,7 +217,7 @@ public AutoFollowPattern(List<String> leaderIndexPatterns,
217
217
Integer maxConcurrentWriteBatches ,
218
218
Integer maxWriteBufferSize ,
219
219
TimeValue maxRetryDelay ,
220
- TimeValue idleShardRetryDelay ,
220
+ TimeValue pollTimeout ,
221
221
Map <String , String > headers ) {
222
222
this .leaderIndexPatterns = leaderIndexPatterns ;
223
223
this .followIndexPattern = followIndexPattern ;
@@ -227,7 +227,7 @@ public AutoFollowPattern(List<String> leaderIndexPatterns,
227
227
this .maxConcurrentWriteBatches = maxConcurrentWriteBatches ;
228
228
this .maxWriteBufferSize = maxWriteBufferSize ;
229
229
this .maxRetryDelay = maxRetryDelay ;
230
- this .idleShardRetryDelay = idleShardRetryDelay ;
230
+ this .pollTimeout = pollTimeout ;
231
231
this .headers = headers != null ? Collections .unmodifiableMap (headers ) : Collections .emptyMap ();
232
232
}
233
233
@@ -240,7 +240,7 @@ public AutoFollowPattern(List<String> leaderIndexPatterns,
240
240
maxConcurrentWriteBatches = in .readOptionalVInt ();
241
241
maxWriteBufferSize = in .readOptionalVInt ();
242
242
maxRetryDelay = in .readOptionalTimeValue ();
243
- idleShardRetryDelay = in .readOptionalTimeValue ();
243
+ pollTimeout = in .readOptionalTimeValue ();
244
244
this .headers = Collections .unmodifiableMap (in .readMap (StreamInput ::readString , StreamInput ::readString ));
245
245
}
246
246
@@ -284,8 +284,8 @@ public TimeValue getMaxRetryDelay() {
284
284
return maxRetryDelay ;
285
285
}
286
286
287
- public TimeValue getIdleShardRetryDelay () {
288
- return idleShardRetryDelay ;
287
+ public TimeValue getPollTimeout () {
288
+ return pollTimeout ;
289
289
}
290
290
291
291
public Map <String , String > getHeaders () {
@@ -302,7 +302,7 @@ public void writeTo(StreamOutput out) throws IOException {
302
302
out .writeOptionalVInt (maxConcurrentWriteBatches );
303
303
out .writeOptionalVInt (maxWriteBufferSize );
304
304
out .writeOptionalTimeValue (maxRetryDelay );
305
- out .writeOptionalTimeValue (idleShardRetryDelay );
305
+ out .writeOptionalTimeValue (pollTimeout );
306
306
out .writeMap (headers , StreamOutput ::writeString , StreamOutput ::writeString );
307
307
}
308
308
@@ -330,8 +330,8 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
330
330
if (maxRetryDelay != null ) {
331
331
builder .field (MAX_RETRY_DELAY .getPreferredName (), maxRetryDelay );
332
332
}
333
- if (idleShardRetryDelay != null ) {
334
- builder .field (IDLE_SHARD_RETRY_DELAY .getPreferredName (), idleShardRetryDelay );
333
+ if (pollTimeout != null ) {
334
+ builder .field (POLL_TIMEOUT .getPreferredName (), pollTimeout );
335
335
}
336
336
builder .field (HEADERS .getPreferredName (), headers );
337
337
return builder ;
@@ -355,7 +355,7 @@ public boolean equals(Object o) {
355
355
Objects .equals (maxConcurrentWriteBatches , that .maxConcurrentWriteBatches ) &&
356
356
Objects .equals (maxWriteBufferSize , that .maxWriteBufferSize ) &&
357
357
Objects .equals (maxRetryDelay , that .maxRetryDelay ) &&
358
- Objects .equals (idleShardRetryDelay , that .idleShardRetryDelay ) &&
358
+ Objects .equals (pollTimeout , that .pollTimeout ) &&
359
359
Objects .equals (headers , that .headers );
360
360
}
361
361
@@ -370,7 +370,7 @@ public int hashCode() {
370
370
maxConcurrentWriteBatches ,
371
371
maxWriteBufferSize ,
372
372
maxRetryDelay ,
373
- idleShardRetryDelay ,
373
+ pollTimeout ,
374
374
headers
375
375
);
376
376
}
0 commit comments