Class AwsRetryStrategy


  • public final class AwsRetryStrategy
    extends Object
    Retry strategies used by clients when communicating with AWS services.
    • Method Detail

      • forRetryMode

        public static RetryStrategy forRetryMode​(RetryMode mode)
        Retrieve the appropriate retry strategy for the retry mode with AWS-specific conditions added.
        Parameters:
        mode - The retry mode for which we want to create a retry strategy.
        Returns:
        A retry strategy for the given retry mode.
      • addRetryConditions

        public static RetryStrategy addRetryConditions​(RetryStrategy strategy)
        Update the provided RetryStrategy to add AWS-specific conditions.
        Parameters:
        strategy - The strategy to update
        Returns:
        The updated strategy.
      • doNotRetry

        public static RetryStrategy doNotRetry()
        Returns a retry strategy that does not retry.
        Returns:
        A retry strategy that do not retry.
      • configure

        public static <T extends RetryStrategy.Builder<T,​?>> T configure​(T builder)
        Configures a retry strategy using its builder to add AWS-specific retry exceptions.
        Type Parameters:
        T - The type of the builder extending RetryStrategy.Builder
        Parameters:
        builder - The builder to add the AWS-specific retry exceptions
        Returns:
        The given builder
      • configureStrategy

        public static RetryStrategy.Builder<?,​?> configureStrategy​(RetryStrategy.Builder<?,​?> builder)
        Configures any retry strategy using its builder to add AWS-specific retry exceptions.
        Parameters:
        builder - The builder to add the AWS-specific retry exceptions
        Returns:
        The given builder