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::request_options Class Reference

Represents a set of timeout and retry policy options that may be specified for an operation request. More...

Inheritance diagram for azure::storage::request_options:
azure::storage::blob_request_options azure::storage::file_request_options azure::storage::queue_request_options azure::storage::table_request_options

Public Member Functions

azure::storage::retry_policy retry_policy () const
 Gets the retry policy for the request. More...
 
void set_retry_policy (azure::storage::retry_policy retry_policy)
 Sets the retry policy for the request. More...
 
const std::chrono::seconds noactivity_timeout () const
 
void set_noactivity_timeout (std::chrono::seconds noactivity_timeout)
 
const std::chrono::seconds server_timeout () const
 Gets the server timeout for the request. More...
 
void set_server_timeout (std::chrono::seconds server_timeout)
 Sets the server timeout for the request. More...
 
const std::chrono::milliseconds maximum_execution_time () const
 Gets the maximum execution time across all potential retries. More...
 
void set_maximum_execution_time (const std::chrono::milliseconds &maximum_execution_time)
 Sets the maximum execution time across all potential retries. More...
 
bool is_maximum_execution_time_customized () const
 Gets if the maximum execution time is set by customer. More...
 
azure::storage::location_mode location_mode () const
 Gets the location mode of the request. More...
 
void set_location_mode (azure::storage::location_mode location_mode)
 Sets the location mode of the request. More...
 
size_t http_buffer_size () const
 Gets the number of bytes to buffer when reading from and writing to a network stream. More...
 
void set_http_buffer_size (size_t http_buffer_size)
 Sets the number of bytes to buffer when reading from and writing to a network stream. More...
 
bool validate_certificates () const
 Gets the server certificate validation property. More...
 
void set_validate_certificates (bool validate_certificates)
 Sets the server certificate validation property. More...
 
std::chrono::time_point< std::chrono::system_clock > operation_expiry_time () const
 Gets the expiry time across all potential retries for the request. More...
 

Detailed Description

Represents a set of timeout and retry policy options that may be specified for an operation request.

Member Function Documentation

◆ http_buffer_size()

size_t azure::storage::request_options::http_buffer_size ( ) const
inline

Gets the number of bytes to buffer when reading from and writing to a network stream.

Returns
The number of bytes to buffer when reading from and writing to a network stream.

Using a larger buffer size is more efficient when downloading and uploading larger blobs because it will reduce CPU usage.

◆ is_maximum_execution_time_customized()

bool azure::storage::request_options::is_maximum_execution_time_customized ( ) const
inline

Gets if the maximum execution time is set by customer.

Returns
True if the maximum execution time is set by customer. False otherwise

◆ location_mode()

azure::storage::location_mode azure::storage::request_options::location_mode ( ) const
inline

Gets the location mode of the request.

Returns
The location mode of the request.

◆ maximum_execution_time()

const std::chrono::milliseconds azure::storage::request_options::maximum_execution_time ( ) const
inline

Gets the maximum execution time across all potential retries.

Returns
The maximum execution time.

◆ operation_expiry_time()

std::chrono::time_point<std::chrono::system_clock> azure::storage::request_options::operation_expiry_time ( ) const
inline

Gets the expiry time across all potential retries for the request.

Returns
The expiry time.

◆ retry_policy()

azure::storage::retry_policy azure::storage::request_options::retry_policy ( ) const
inline

Gets the retry policy for the request.

Returns
The retry policy for the request.

◆ server_timeout()

const std::chrono::seconds azure::storage::request_options::server_timeout ( ) const
inline

Gets the server timeout for the request.

Returns
The server timeout for the request.

◆ set_http_buffer_size()

void azure::storage::request_options::set_http_buffer_size ( size_t  http_buffer_size)
inline

Sets the number of bytes to buffer when reading from and writing to a network stream.

Parameters
http_buffer_sizeThe number of bytes to buffer when reading from and writing to a network stream.

Using a larger buffer size is more efficient when downloading and uploading larger blobs because it will reduce CPU usage.

◆ set_location_mode()

void azure::storage::request_options::set_location_mode ( azure::storage::location_mode  location_mode)
inline

Sets the location mode of the request.

Parameters
location_modeThe location mode of the request.

◆ set_maximum_execution_time()

void azure::storage::request_options::set_maximum_execution_time ( const std::chrono::milliseconds &  maximum_execution_time)
inline

Sets the maximum execution time across all potential retries.

Parameters
maximum_execution_timeThe maximum execution time.

This option will not control the total execution time in async open read/open write operations. It will be set in each underline request of read/write/close operation to make sure those request is finished within this time, or timeout if otherwise.

◆ set_retry_policy()

void azure::storage::request_options::set_retry_policy ( azure::storage::retry_policy  retry_policy)
inline

Sets the retry policy for the request.

Parameters
retry_policyThe retry policy for the request.

◆ set_server_timeout()

void azure::storage::request_options::set_server_timeout ( std::chrono::seconds  server_timeout)
inline

Sets the server timeout for the request.

Parameters
server_timeoutThe server timeout for the request.

◆ set_validate_certificates()

void azure::storage::request_options::set_validate_certificates ( bool  validate_certificates)
inline

Sets the server certificate validation property.

Parameters
validate_certificatesFalse to disable all server certificate validation, true otherwise.

Disabling certificate validation is not recommended and will make the user exposed to unsecure environment. Please use with caution and at your own risk.

◆ validate_certificates()

bool azure::storage::request_options::validate_certificates ( ) const
inline

Gets the server certificate validation property.

Returns
True if certificates are to be verified, false otherwise