Class RetryPolicyContext

java.lang.Object
software.amazon.awssdk.core.retry.RetryPolicyContext
All Implemented Interfaces:
ToCopyableBuilder<RetryPolicyContext.Builder,RetryPolicyContext>

@Immutable public final class RetryPolicyContext extends Object implements ToCopyableBuilder<RetryPolicyContext.Builder,RetryPolicyContext>
Contains useful information about a failed request that can be used to make retry and backoff decisions. See RetryPolicy and RetryStrategy.
  • Method Details

    • builder

      public static RetryPolicyContext.Builder builder()
    • originalRequest

      public SdkRequest originalRequest()
      Returns:
      The original request passed to the client method for an operation.
    • request

      public SdkHttpFullRequest request()
      Returns:
      The marshalled request.
    • exception

      public SdkException exception()
      Returns:
      The last seen exception for the request.
    • executionAttributes

      public ExecutionAttributes executionAttributes()
      Returns:
      Mutable execution context.
    • retriesAttempted

      public int retriesAttempted()
      Returns:
      Number of retries attempted thus far.
    • totalRequests

      public int totalRequests()
      Returns:
      The total number of requests made thus far.
    • httpStatusCode

      public Integer httpStatusCode()
      Returns:
      HTTP status code of response. May be null if no response was received from the service.
    • toBuilder

      public RetryPolicyContext.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<RetryPolicyContext.Builder,RetryPolicyContext>
      Returns:
      a builder for type T