Microsoft Azure Storage Client Library for C++  7.5.0
The Microsoft Azure Storage Client Library for C++ is a library for working with the Azure Storage Services in C++.
Public Member Functions | List of all members
azure::storage::retry_context Class Reference

Represents the context for one or more retries of a request made against the Windows Azure storage services, including the number of retries made for the request, the results of the last request, and the storage location and location mode for subsequent retries. More...

Public Member Functions

 retry_context (int current_retry_count, request_result last_request_result, storage_location next_location, location_mode current_location_mode, const std::exception_ptr &nonstorage_exception=nullptr)
 Initializes a new instance of the azure::storage::retry_context class. More...
 
int current_retry_count () const
 Gets the number of retries for the given operation. More...
 
const request_resultlast_request_result () const
 Gets the results of the last request. More...
 
storage_location next_location () const
 Gets the target location for the next retry. More...
 
location_mode current_location_mode () const
 Gets the location mode for subsequent retries. More...
 
const std::exception_ptr & nonstorage_exception () const
 Gets the exception_ptr of any unhandled nonstorage exception during the request. Example: WinHttp exceptions for timeout (12002) More...
 

Detailed Description

Represents the context for one or more retries of a request made against the Windows Azure storage services, including the number of retries made for the request, the results of the last request, and the storage location and location mode for subsequent retries.

Constructor & Destructor Documentation

◆ retry_context()

azure::storage::retry_context::retry_context ( int  current_retry_count,
request_result  last_request_result,
storage_location  next_location,
location_mode  current_location_mode,
const std::exception_ptr &  nonstorage_exception = nullptr 
)
inline

Initializes a new instance of the azure::storage::retry_context class.

Parameters
current_retry_countThe current retry count.
last_request_resultThe last request result.
next_locationThe next location to retry.
current_location_modeThe current location mode.
nonstorage_exceptionException Ptr of any exception other than storage_exception

Member Function Documentation

◆ current_location_mode()

location_mode azure::storage::retry_context::current_location_mode ( ) const
inline

Gets the location mode for subsequent retries.

Returns
The azure::storage::location_mode for subsequent retries.

◆ current_retry_count()

int azure::storage::retry_context::current_retry_count ( ) const
inline

Gets the number of retries for the given operation.

Returns
The number of retries for the given operation.

◆ last_request_result()

const request_result& azure::storage::retry_context::last_request_result ( ) const
inline

Gets the results of the last request.

Returns
An azure::storage::request_result object that represents the results of the last request.

◆ next_location()

storage_location azure::storage::retry_context::next_location ( ) const
inline

Gets the target location for the next retry.

Returns
The azure::storage::storage_location for the next retry.

◆ nonstorage_exception()

const std::exception_ptr& azure::storage::retry_context::nonstorage_exception ( ) const
inline

Gets the exception_ptr of any unhandled nonstorage exception during the request. Example: WinHttp exceptions for timeout (12002)

Returns
An std::exception_ptr object that represents the nonstorage exception thrown while sending request