@@ -285,11 +285,13 @@ public static class Builder extends StubSettings.Builder<DashboardsServiceStubSe
285
285
ImmutableMap .Builder <String , ImmutableSet <StatusCode .Code >> definitions =
286
286
ImmutableMap .builder ();
287
287
definitions .put (
288
- "idempotent " ,
288
+ "retry_policy_1_codes " ,
289
289
ImmutableSet .copyOf (
290
290
Lists .<StatusCode .Code >newArrayList (
291
- StatusCode .Code .DEADLINE_EXCEEDED , StatusCode .Code .UNAVAILABLE )));
292
- definitions .put ("non_idempotent" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
291
+ StatusCode .Code .UNAVAILABLE , StatusCode .Code .UNKNOWN )));
292
+ definitions .put ("no_retry_codes" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
293
+ definitions .put (
294
+ "no_retry_1_codes" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
293
295
RETRYABLE_CODE_DEFINITIONS = definitions .build ();
294
296
}
295
297
@@ -300,15 +302,25 @@ public static class Builder extends StubSettings.Builder<DashboardsServiceStubSe
300
302
RetrySettings settings = null ;
301
303
settings =
302
304
RetrySettings .newBuilder ()
303
- .setInitialRetryDelay (Duration .ofMillis (100L ))
305
+ .setInitialRetryDelay (Duration .ofMillis (1000L ))
304
306
.setRetryDelayMultiplier (1.3 )
305
- .setMaxRetryDelay (Duration .ofMillis (60000L ))
306
- .setInitialRpcTimeout (Duration .ofMillis (20000L ))
307
+ .setMaxRetryDelay (Duration .ofMillis (10000L ))
308
+ .setInitialRpcTimeout (Duration .ofMillis (30000L ))
309
+ .setRpcTimeoutMultiplier (1.0 )
310
+ .setMaxRpcTimeout (Duration .ofMillis (30000L ))
311
+ .setTotalTimeout (Duration .ofMillis (30000L ))
312
+ .build ();
313
+ definitions .put ("retry_policy_1_params" , settings );
314
+ settings = RetrySettings .newBuilder ().setRpcTimeoutMultiplier (1.0 ).build ();
315
+ definitions .put ("no_retry_params" , settings );
316
+ settings =
317
+ RetrySettings .newBuilder ()
318
+ .setInitialRpcTimeout (Duration .ofMillis (30000L ))
307
319
.setRpcTimeoutMultiplier (1.0 )
308
- .setMaxRpcTimeout (Duration .ofMillis (20000L ))
309
- .setTotalTimeout (Duration .ofMillis (600000L ))
320
+ .setMaxRpcTimeout (Duration .ofMillis (30000L ))
321
+ .setTotalTimeout (Duration .ofMillis (30000L ))
310
322
.build ();
311
- definitions .put ("default " , settings );
323
+ definitions .put ("no_retry_1_params " , settings );
312
324
RETRY_PARAM_DEFINITIONS = definitions .build ();
313
325
}
314
326
@@ -353,28 +365,28 @@ private static Builder initDefaults(Builder builder) {
353
365
354
366
builder
355
367
.createDashboardSettings ()
356
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
357
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
368
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("no_retry_1_codes " ))
369
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("no_retry_1_params " ));
358
370
359
371
builder
360
372
.listDashboardsSettings ()
361
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
362
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
373
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
374
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
363
375
364
376
builder
365
377
.getDashboardSettings ()
366
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
367
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
378
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
379
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
368
380
369
381
builder
370
382
.deleteDashboardSettings ()
371
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
372
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
383
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("no_retry_1_codes " ))
384
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("no_retry_1_params " ));
373
385
374
386
builder
375
387
.updateDashboardSettings ()
376
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
377
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
388
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("no_retry_1_codes " ))
389
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("no_retry_1_params " ));
378
390
379
391
return builder ;
380
392
}
0 commit comments