use of software.amazon.awssdk.core.retry.RetryMode in project aws-sdk-java-v2 by aws.
the class KinesisRetryPolicy method resolveRetryPolicy.
public static RetryPolicy resolveRetryPolicy(SdkClientConfiguration config) {
RetryPolicy configuredRetryPolicy = config.option(SdkClientOption.RETRY_POLICY);
if (configuredRetryPolicy != null) {
return addRetryConditions(configuredRetryPolicy);
}
RetryMode retryMode = RetryMode.resolver().profileFile(() -> config.option(SdkClientOption.PROFILE_FILE)).profileName(config.option(SdkClientOption.PROFILE_NAME)).defaultRetryMode(config.option(SdkClientOption.DEFAULT_RETRY_MODE)).resolve();
return AwsRetryPolicy.forRetryMode(retryMode).toBuilder().applyMutation(KinesisRetryPolicy::addRetryConditions).additionalRetryConditionsAllowed(false).build();
}
Aggregations