RetryInfo Class

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

public class RetryInfo

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

Constructor Summary

Constructor Description
RetryInfo()

Initializes a new instance of the RetryInfo class.

RetryInfo(RetryContext retryContext)

Initializes a new instance of the RetryInfo class.

Method Summary

Modifier and Type Method and Description
int getRetryInterval()

Gets the interval in milliseconds until the next retry. The minimum back-off interval is 3 seconds.

final StorageLocation getTargetLocation()

Gets the location that the next retry should target.

LocationMode getUpdatedLocationMode()

Gets the location mode for subsequent retries.

void setRetryInterval(int retryInterval)

Sets the interval in milliseconds until the next retry. The minimum back-off interval is 3 seconds.

void setTargetLocation(StorageLocation targetLocation)

Sets the location that the next retry should target.

void setUpdatedLocationMode(LocationMode updatedLocationMode)

Sets the location mode for subsequent retries.

String toString()

Returns a string that represents the current RetryInfo instance.

Constructor Details

RetryInfo

public RetryInfo()

Initializes a new instance of the RetryInfo class.

RetryInfo

public RetryInfo(RetryContext retryContext)

Initializes a new instance of the RetryInfo class.

Parameters:

retryContext - The RetryContext object that was passed in to the retry policy.

Method Details

getRetryInterval

public int getRetryInterval()

Gets the interval in milliseconds until the next retry. The minimum back-off interval is 3 seconds.

Returns:

An int which represents the retry interval (in milliseconds).

getTargetLocation

public final StorageLocation getTargetLocation()

Gets the location that the next retry should target.

Returns:

A StorageLocation object which represents the location for the next retry.

getUpdatedLocationMode

public LocationMode getUpdatedLocationMode()

Gets the location mode for subsequent retries.

Returns:

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

setRetryInterval

public void setRetryInterval(int retryInterval)

Sets the interval in milliseconds until the next retry. The minimum back-off interval is 3 seconds.

Parameters:

retryInterval - An int which represents the retry interval to set.

setTargetLocation

public void setTargetLocation(StorageLocation targetLocation)

Sets the location that the next retry should target.

Parameters:

targetLocation - A StorageLocation object which represents the location to set.

setUpdatedLocationMode

public void setUpdatedLocationMode(LocationMode updatedLocationMode)

Sets the location mode for subsequent retries.

Parameters:

updatedLocationMode - A LocationMode object which represents the the location mode to set.

toString

public String toString()

Returns a string that represents the current RetryInfo instance.

Returns:

A String which represents the current RetryInfo instance.

Applies to