@@ -435,11 +435,15 @@ public static class Builder extends StubSettings.Builder<CloudBillingStubSetting
435
435
ImmutableMap .Builder <String , ImmutableSet <StatusCode .Code >> definitions =
436
436
ImmutableMap .builder ();
437
437
definitions .put (
438
- "idempotent " ,
438
+ "retry_policy_1_codes " ,
439
439
ImmutableSet .copyOf (
440
440
Lists .<StatusCode .Code >newArrayList (
441
441
StatusCode .Code .DEADLINE_EXCEEDED , StatusCode .Code .UNAVAILABLE )));
442
- definitions .put ("non_idempotent" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
442
+ definitions .put (
443
+ "no_retry_2_codes" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
444
+ definitions .put ("no_retry_codes" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
445
+ definitions .put (
446
+ "no_retry_1_codes" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
443
447
RETRYABLE_CODE_DEFINITIONS = definitions .build ();
444
448
}
445
449
@@ -453,12 +457,30 @@ public static class Builder extends StubSettings.Builder<CloudBillingStubSetting
453
457
.setInitialRetryDelay (Duration .ofMillis (100L ))
454
458
.setRetryDelayMultiplier (1.3 )
455
459
.setMaxRetryDelay (Duration .ofMillis (60000L ))
456
- .setInitialRpcTimeout (Duration .ofMillis (20000L ))
460
+ .setInitialRpcTimeout (Duration .ofMillis (60000L ))
461
+ .setRpcTimeoutMultiplier (1.0 )
462
+ .setMaxRpcTimeout (Duration .ofMillis (60000L ))
463
+ .setTotalTimeout (Duration .ofMillis (60000L ))
464
+ .build ();
465
+ definitions .put ("retry_policy_1_params" , settings );
466
+ settings = RetrySettings .newBuilder ().setRpcTimeoutMultiplier (1.0 ).build ();
467
+ definitions .put ("no_retry_params" , settings );
468
+ settings =
469
+ RetrySettings .newBuilder ()
470
+ .setInitialRpcTimeout (Duration .ofMillis (60000L ))
471
+ .setRpcTimeoutMultiplier (1.0 )
472
+ .setMaxRpcTimeout (Duration .ofMillis (60000L ))
473
+ .setTotalTimeout (Duration .ofMillis (60000L ))
474
+ .build ();
475
+ definitions .put ("no_retry_1_params" , settings );
476
+ settings =
477
+ RetrySettings .newBuilder ()
478
+ .setInitialRpcTimeout (Duration .ofMillis (60000L ))
457
479
.setRpcTimeoutMultiplier (1.0 )
458
- .setMaxRpcTimeout (Duration .ofMillis (20000L ))
459
- .setTotalTimeout (Duration .ofMillis (600000L ))
480
+ .setMaxRpcTimeout (Duration .ofMillis (60000L ))
481
+ .setTotalTimeout (Duration .ofMillis (60000L ))
460
482
.build ();
461
- definitions .put ("default " , settings );
483
+ definitions .put ("no_retry_2_params " , settings );
462
484
RETRY_PARAM_DEFINITIONS = definitions .build ();
463
485
}
464
486
@@ -520,53 +542,53 @@ private static Builder initDefaults(Builder builder) {
520
542
521
543
builder
522
544
.getBillingAccountSettings ()
523
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
524
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
545
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
546
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
525
547
526
548
builder
527
549
.listBillingAccountsSettings ()
528
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
529
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
550
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
551
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
530
552
531
553
builder
532
554
.updateBillingAccountSettings ()
533
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
534
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
555
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
556
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
535
557
536
558
builder
537
559
.createBillingAccountSettings ()
538
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
539
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
560
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("no_retry_1_codes " ))
561
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("no_retry_1_params " ));
540
562
541
563
builder
542
564
.listProjectBillingInfoSettings ()
543
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
544
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
565
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
566
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
545
567
546
568
builder
547
569
.getProjectBillingInfoSettings ()
548
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
549
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
570
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
571
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
550
572
551
573
builder
552
574
.updateProjectBillingInfoSettings ()
553
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
554
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
575
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
576
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
555
577
556
578
builder
557
579
.getIamPolicySettings ()
558
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
559
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
580
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
581
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
560
582
561
583
builder
562
584
.setIamPolicySettings ()
563
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
564
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
585
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
586
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
565
587
566
588
builder
567
589
.testIamPermissionsSettings ()
568
- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
569
- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
590
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
591
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
570
592
571
593
return builder ;
572
594
}
0 commit comments