Package software.amazon.awssdk.imds
Class Ec2MetadataRetryPolicy
java.lang.Object
software.amazon.awssdk.imds.Ec2MetadataRetryPolicy
- All Implemented Interfaces:
ToCopyableBuilder<Ec2MetadataRetryPolicy.Builder,Ec2MetadataRetryPolicy>
@SdkPublicApi
public final class Ec2MetadataRetryPolicy
extends Object
implements ToCopyableBuilder<Ec2MetadataRetryPolicy.Builder,Ec2MetadataRetryPolicy>
Interface for specifying a retry policy to use when evaluating whether or not a request should be retried, and the gap
between each retry. The
builder() can be used to construct a retry policy with numRetries and backoffStrategy.
When using the builder() the SDK will use default values for fields that are not provided.A custom BackoffStrategy
can be used to construct a policy or a default BackoffStrategy is used.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionMethod to return the BackoffStrategy used.builder()booleaninthashCode()static Ec2MetadataRetryPolicynone()intMethod to return the number of retries allowed.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
equals
-
hashCode
public int hashCode() -
toString
-
numRetries
public int numRetries()Method to return the number of retries allowed.- Returns:
- The number of retries allowed.
-
backoffStrategy
Method to return the BackoffStrategy used.- Returns:
- The backoff Strategy used.
-
builder
-
toBuilder
- Specified by:
toBuilderin interfaceToCopyableBuilder<Ec2MetadataRetryPolicy.Builder,Ec2MetadataRetryPolicy>
-
none
-