@@ -498,11 +498,9 @@ public static class Builder extends StubSettings.Builder<OsConfigServiceStubSett
498498 ImmutableMap .Builder <String , ImmutableSet <StatusCode .Code >> definitions =
499499 ImmutableMap .builder ();
500500 definitions .put (
501- "idempotent" ,
502- ImmutableSet .copyOf (
503- Lists .<StatusCode .Code >newArrayList (
504- StatusCode .Code .DEADLINE_EXCEEDED , StatusCode .Code .UNAVAILABLE )));
505- definitions .put ("non_idempotent" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
501+ "retry_policy_1_codes" ,
502+ ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList (StatusCode .Code .UNAVAILABLE )));
503+ definitions .put ("no_retry_codes" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
506504 RETRYABLE_CODE_DEFINITIONS = definitions .build ();
507505 }
508506
@@ -513,15 +511,17 @@ public static class Builder extends StubSettings.Builder<OsConfigServiceStubSett
513511 RetrySettings settings = null ;
514512 settings =
515513 RetrySettings .newBuilder ()
516- .setInitialRetryDelay (Duration .ofMillis (100L ))
514+ .setInitialRetryDelay (Duration .ofMillis (1000L ))
517515 .setRetryDelayMultiplier (1.3 )
518516 .setMaxRetryDelay (Duration .ofMillis (60000L ))
519- .setInitialRpcTimeout (Duration .ofMillis (20000L ))
517+ .setInitialRpcTimeout (Duration .ofMillis (60000L ))
520518 .setRpcTimeoutMultiplier (1.0 )
521- .setMaxRpcTimeout (Duration .ofMillis (20000L ))
522- .setTotalTimeout (Duration .ofMillis (600000L ))
519+ .setMaxRpcTimeout (Duration .ofMillis (60000L ))
520+ .setTotalTimeout (Duration .ofMillis (60000L ))
523521 .build ();
524- definitions .put ("default" , settings );
522+ definitions .put ("retry_policy_1_params" , settings );
523+ settings = RetrySettings .newBuilder ().setRpcTimeoutMultiplier (1.0 ).build ();
524+ definitions .put ("no_retry_params" , settings );
525525 RETRY_PARAM_DEFINITIONS = definitions .build ();
526526 }
527527
@@ -580,48 +580,48 @@ private static Builder initDefaults(Builder builder) {
580580
581581 builder
582582 .executePatchJobSettings ()
583- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
584- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
583+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
584+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
585585
586586 builder
587587 .getPatchJobSettings ()
588- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
589- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
588+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
589+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
590590
591591 builder
592592 .cancelPatchJobSettings ()
593- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
594- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
593+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
594+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
595595
596596 builder
597597 .listPatchJobsSettings ()
598- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
599- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
598+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
599+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
600600
601601 builder
602602 .listPatchJobInstanceDetailsSettings ()
603- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
604- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
603+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
604+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
605605
606606 builder
607607 .createPatchDeploymentSettings ()
608- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
609- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
608+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
609+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
610610
611611 builder
612612 .getPatchDeploymentSettings ()
613- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
614- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
613+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
614+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
615615
616616 builder
617617 .listPatchDeploymentsSettings ()
618- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
619- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
618+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
619+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
620620
621621 builder
622622 .deletePatchDeploymentSettings ()
623- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
624- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
623+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
624+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
625625
626626 return builder ;
627627 }
0 commit comments