@@ -285,11 +285,13 @@ public static class Builder extends StubSettings.Builder<DashboardsServiceStubSe
285285 ImmutableMap .Builder <String , ImmutableSet <StatusCode .Code >> definitions =
286286 ImmutableMap .builder ();
287287 definitions .put (
288- "idempotent " ,
288+ "retry_policy_1_codes " ,
289289 ImmutableSet .copyOf (
290290 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 ()));
293295 RETRYABLE_CODE_DEFINITIONS = definitions .build ();
294296 }
295297
@@ -300,15 +302,25 @@ public static class Builder extends StubSettings.Builder<DashboardsServiceStubSe
300302 RetrySettings settings = null ;
301303 settings =
302304 RetrySettings .newBuilder ()
303- .setInitialRetryDelay (Duration .ofMillis (100L ))
305+ .setInitialRetryDelay (Duration .ofMillis (1000L ))
304306 .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 ))
307319 .setRpcTimeoutMultiplier (1.0 )
308- .setMaxRpcTimeout (Duration .ofMillis (20000L ))
309- .setTotalTimeout (Duration .ofMillis (600000L ))
320+ .setMaxRpcTimeout (Duration .ofMillis (30000L ))
321+ .setTotalTimeout (Duration .ofMillis (30000L ))
310322 .build ();
311- definitions .put ("default " , settings );
323+ definitions .put ("no_retry_1_params " , settings );
312324 RETRY_PARAM_DEFINITIONS = definitions .build ();
313325 }
314326
@@ -353,28 +365,28 @@ private static Builder initDefaults(Builder builder) {
353365
354366 builder
355367 .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 " ));
358370
359371 builder
360372 .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 " ));
363375
364376 builder
365377 .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 " ));
368380
369381 builder
370382 .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 " ));
373385
374386 builder
375387 .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 " ));
378390
379391 return builder ;
380392 }
0 commit comments