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_break_period Class Reference

Specifies the proposed duration of seconds that the lease should continue before it is broken. More...

Public Member Functions

 lease_break_period ()
 Initializes a new instance of the azure::storage::lease_break_period class that breaks a fixed-duration lease after the remaining lease period elapses, or breaks an infinite lease immediately. More...
 
 lease_break_period (const std::chrono::seconds &seconds)
 Initializes a new instance of the azure::storage::lease_break_period class that breaks a lease after the proposed duration. More...
 
bool is_valid () const
 Indicates whether the azure::storage::lease_break_period object is valid. More...
 
const std::chrono::seconds & seconds () const
 Gets the proposed duration for the lease before it is broken. More...
 

Detailed Description

Specifies the proposed duration of seconds that the lease should continue before it is broken.

Constructor & Destructor Documentation

◆ lease_break_period() [1/2]

azure::storage::lease_break_period::lease_break_period ( )
inline

Initializes a new instance of the azure::storage::lease_break_period class that breaks a fixed-duration lease after the remaining lease period elapses, or breaks an infinite lease immediately.

◆ lease_break_period() [2/2]

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

Initializes a new instance of the azure::storage::lease_break_period class that breaks a lease after the proposed duration.

Parameters
secondsThe proposed duration, in seconds, for the lease before it is broken. Value may be between 0 and 60 seconds.

Member Function Documentation

◆ is_valid()

bool azure::storage::lease_break_period::is_valid ( ) const
inline

Indicates whether the azure::storage::lease_break_period object is valid.

Returns
true if the azure::storage::lease_break_period object is valid; otherwise, false.

◆ seconds()

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

Gets the proposed duration for the lease before it is broken.

Returns
The proposed proposed duration for the lease before it is broken, in seconds.