@@ -498,11 +498,9 @@ public static class Builder extends StubSettings.Builder<OsConfigServiceStubSett
ImmutableMap .Builder <String , ImmutableSet <StatusCode .Code >> definitions =
ImmutableMap .builder ();
definitions .put (
"idempotent" ,
ImmutableSet .copyOf (
Lists .<StatusCode .Code >newArrayList (
StatusCode .Code .DEADLINE_EXCEEDED , StatusCode .Code .UNAVAILABLE )));
definitions .put ("non_idempotent" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
"retry_policy_1_codes" ,
ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList (StatusCode .Code .UNAVAILABLE )));
definitions .put ("no_retry_codes" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
RETRYABLE_CODE_DEFINITIONS = definitions .build ();
}
@@ -513,15 +511,17 @@ public static class Builder extends StubSettings.Builder<OsConfigServiceStubSett
RetrySettings settings = null ;
settings =
RetrySettings .newBuilder ()
.setInitialRetryDelay (Duration .ofMillis (100L ))
.setInitialRetryDelay (Duration .ofMillis (1000L ))
.setRetryDelayMultiplier (1.3 )
.setMaxRetryDelay (Duration .ofMillis (60000L ))
.setInitialRpcTimeout (Duration .ofMillis (20000L ))
.setInitialRpcTimeout (Duration .ofMillis (60000L ))
.setRpcTimeoutMultiplier (1.0 )
.setMaxRpcTimeout (Duration .ofMillis (20000L ))
.setTotalTimeout (Duration .ofMillis (600000L ))
.setMaxRpcTimeout (Duration .ofMillis (60000L ))
.setTotalTimeout (Duration .ofMillis (60000L ))
.build ();
definitions .put ("default" , settings );
definitions .put ("retry_policy_1_params" , settings );
settings = RetrySettings .newBuilder ().setRpcTimeoutMultiplier (1.0 ).build ();
definitions .put ("no_retry_params" , settings );
RETRY_PARAM_DEFINITIONS = definitions .build ();
}
@@ -580,48 +580,48 @@ private static Builder initDefaults(Builder builder) {
builder
.executePatchJobSettings ()
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
builder
.getPatchJobSettings ()
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
builder
.cancelPatchJobSettings ()
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
builder
.listPatchJobsSettings ()
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
builder
.listPatchJobInstanceDetailsSettings ()
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
builder
.createPatchDeploymentSettings ()
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
builder
.getPatchDeploymentSettings ()
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
builder
.listPatchDeploymentsSettings ()
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("idempotent " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
builder
.deletePatchDeploymentSettings ()
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("non_idempotent " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("default " ));
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
return builder ;
}