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

Specifies the duration of the lease. More...

Public Member Functions

 lease_time ()
 Initializes a new instance of the azure::storage::lease_time class that never expires. More...
 
 lease_time (const std::chrono::seconds &seconds)
 Initializes a new instance of the azure::storage::lease_time class that expires after the specified duration. More...
 
const std::chrono::seconds & seconds () const
 Gets the duration of the lease in seconds for a non-infinite lease. More...
 

Detailed Description

Specifies the duration of the lease.

Constructor & Destructor Documentation

◆ lease_time() [1/2]

azure::storage::lease_time::lease_time ( )
inline

Initializes a new instance of the azure::storage::lease_time class that never expires.

◆ lease_time() [2/2]

azure::storage::lease_time::lease_time ( const std::chrono::seconds &  seconds)
inline

Initializes a new instance of the azure::storage::lease_time class that expires after the specified duration.

Parameters
secondsThe duration of the lease in seconds. For a non-infinite lease, this value can be between 15 and 60 seconds.

Member Function Documentation

◆ seconds()

const std::chrono::seconds& azure::storage::lease_time::seconds ( ) const
inline

Gets the duration of the lease in seconds for a non-infinite lease.

Returns
The duration of the lease.