다음을 통해 공유


RetryContext Class

  • java.lang.Object
    • com.microsoft.azure.storage.RetryContext

public class RetryContext

Represents the context for a retry of a request made against the storage services.

Constructor Summary

Constructor Description
RetryContext(int currentRetryCount, RequestResult lastRequestResult, StorageLocation nextLocation, LocationMode locationMode)

Creates an instance of the class.

Method Summary

Modifier and Type Method and Description
int getCurrentRetryCount()

Gets the number of retries for the given operation.

RequestResult getLastRequestResult()

Gets the last request's results.

LocationMode getLocationMode()

Gets the location mode for subsequent retries.

StorageLocation getNextLocation()

Gets the location that the next retry should target.

String toString()

Returns a string that represents the current RetryContext instance.

Constructor Details

RetryContext

public RetryContext(int currentRetryCount, RequestResult lastRequestResult, StorageLocation nextLocation, LocationMode locationMode)

Creates an instance of the class.

Parameters:

currentRetryCount - An int which represents the number of retries for the given operation.
lastRequestResult - A RequestResult object which represents the last request's results.
nextLocation - A StorageLocation object which represents the location mode for subsequent retries.
locationMode - A LocationMode value which represents the location mode for subsequent retries.

Method Details

getCurrentRetryCount

public int getCurrentRetryCount()

Gets the number of retries for the given operation.

Returns:

An int which represents the number of retries for the given operation.

getLastRequestResult

public RequestResult getLastRequestResult()

Gets the last request's results.

Returns:

A RequestResult object which represents the last request's results.

getLocationMode

public LocationMode getLocationMode()

Gets the location mode for subsequent retries.

Returns:

A LocationMode value which represents the location mode for subsequent retries.

getNextLocation

public StorageLocation getNextLocation()

Gets the location that the next retry should target.

Returns:

A StorageLocation object which represents the location for subsequent retries.

toString

public String toString()

Returns a string that represents the current RetryContext instance.

Returns:

An String which represents the current RetryContext instance.

Applies to