Java Code Examples for software.amazon.awssdk.core.retry.RetryPolicy#additionalRetryConditionsAllowed()
The following examples show how to use
software.amazon.awssdk.core.retry.RetryPolicy#additionalRetryConditionsAllowed() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AwsDefaultClientBuilder.java From aws-sdk-java-v2 with Apache License 2.0 | 6 votes |
private RetryPolicy resolveAwsRetryPolicy(SdkClientConfiguration config) { RetryPolicy policy = config.option(SdkClientOption.RETRY_POLICY); if (policy != null) { if (policy.additionalRetryConditionsAllowed()) { return AwsRetryPolicy.addRetryConditions(policy); } else { return policy; } } RetryMode retryMode = RetryMode.resolver() .profileFile(() -> config.option(SdkClientOption.PROFILE_FILE)) .profileName(config.option(SdkClientOption.PROFILE_NAME)) .resolve(); return AwsRetryPolicy.forRetryMode(retryMode); }
Example 2
Source File: KinesisRetryPolicy.java From aws-sdk-java-v2 with Apache License 2.0 | 5 votes |
public static RetryPolicy addRetryConditions(RetryPolicy policy) { if (!policy.additionalRetryConditionsAllowed()) { return policy; } return policy.toBuilder() .applyMutation(KinesisRetryPolicy::addRetryConditions) .build(); }