Dela via


RequestRetryCondition Class

  • java.lang.Object
    • com.azure.core.http.policy.RequestRetryCondition

public final class RequestRetryCondition

Information about the request that failed, used to determine whether a retry should be attempted.

Method Summary

Modifier and Type Method and Description
HttpResponse getResponse()

Gets the HTTP response of the request that failed.

List<Throwable> getRetriedThrowables()

Gets the unmodifiable list of throwables that have been encountered during retries.

Throwable getThrowable()

Gets the throwable of the request that failed.

int getTryCount()

Gets the number of tries that have been attempted.

Methods inherited from java.lang.Object

Method Details

getResponse

public HttpResponse getResponse()

Gets the HTTP response of the request that failed.

This may be null if the request failed with a throwable and no response was received.

Returns:

The HTTP response of the request that failed.

getRetriedThrowables

public List getRetriedThrowables()

Gets the unmodifiable list of throwables that have been encountered during retries.

Returns:

The unmodifiable list of throwables that have been encountered during retries.

getThrowable

public Throwable getThrowable()

Gets the throwable of the request that failed.

This may be null if the request failed with a response and no throwable was received.

Returns:

The throwable of the request that failed.

getTryCount

public int getTryCount()

Gets the number of tries that have been attempted.

Returns:

The number of tries that have been attempted.

Applies to