6#include "azure/storage/files/shares/share_client.hpp"
7#include "azure/storage/files/shares/share_file_client.hpp"
13namespace Azure {
namespace Storage {
namespace Files {
namespace Shares {
27 : m_fileClient(std::move(fileClient)), m_leaseId(std::move(leaseId))
38 : m_shareClient(std::move(shareClient)), m_leaseId(std::move(leaseId))
61 std::lock_guard<std::mutex> guard(m_mutex);
75 Azure::Response<Models::AcquireLeaseResult>
Acquire(
76 std::chrono::seconds duration,
78 const Azure::Core::Context& context = Azure::Core::Context());
87 Azure::Response<Models::RenewLeaseResult>
Renew(
89 const Azure::Core::Context& context = Azure::Core::Context());
98 Azure::Response<Models::ReleaseLeaseResult>
Release(
100 const Azure::Core::Context& context = Azure::Core::Context());
111 Azure::Response<Models::ChangeLeaseResult>
Change(
112 const std::string& proposedLeaseId,
114 const Azure::Core::Context& context = Azure::Core::Context());
123 Azure::Response<Models::BreakLeaseResult>
Break(
125 const Azure::Core::Context& context = Azure::Core::Context());
128 Azure::Nullable<ShareFileClient> m_fileClient;
129 Azure::Nullable<ShareClient> m_shareClient;
131 std::string m_leaseId;
The ShareClient allows you to manipulate Azure Storage shares and their directories and files.
Definition share_client.hpp:24
The ShareFileClient allows you to manipulate Azure Storage shares and their directories and files.
Definition share_file_client.hpp:24
ShareLeaseClient allows you to manipulate Azure Storage leases on shares and files.
Definition share_lease_client.hpp:18
const std::string & GetLeaseId()
Get lease ID of this lease client.
Definition share_lease_client.hpp:59
Azure::Response< Models::ChangeLeaseResult > Change(const std::string &proposedLeaseId, const ChangeLeaseOptions &options=ChangeLeaseOptions(), const Azure::Core::Context &context=Azure::Core::Context())
Changes the lease of an active lease.
Azure::Response< Models::RenewLeaseResult > Renew(const RenewLeaseOptions &options=RenewLeaseOptions(), const Azure::Core::Context &context=Azure::Core::Context())
Renews the share's previously-acquired lease.
Azure::Response< Models::BreakLeaseResult > Break(const BreakLeaseOptions &options=BreakLeaseOptions(), const Azure::Core::Context &context=Azure::Core::Context())
Breaks the previously-acquired lease.
ShareLeaseClient(ShareFileClient fileClient, std::string leaseId)
Initializes a new instance of the ShareLeaseClient.
Definition share_lease_client.hpp:26
Azure::Response< Models::ReleaseLeaseResult > Release(const ReleaseLeaseOptions &options=ReleaseLeaseOptions(), const Azure::Core::Context &context=Azure::Core::Context())
Releases the file or share's previously-acquired lease.
ShareLeaseClient(ShareClient shareClient, std::string leaseId)
Initializes a new instance of the ShareLeaseClient.
Definition share_lease_client.hpp:37
static std::string CreateUniqueLeaseId()
Gets a unique lease ID.
static AZ_STORAGE_FILES_SHARES_DLLEXPORT const std::chrono::seconds InfiniteLeaseDuration
A value representing infinite lease duration.
Definition share_lease_client.hpp:52
Azure::Response< Models::AcquireLeaseResult > Acquire(std::chrono::seconds duration, const AcquireLeaseOptions &options=AcquireLeaseOptions(), const Azure::Core::Context &context=Azure::Core::Context())
Acquires a lease on the file or share.
Optional parameters for Azure::Storage::Files::Shares::ShareLeaseClient::Acquire.
Definition share_options.hpp:1351
Optional parameters for Azure::Storage::Files::Shares::ShareLeaseClient::Break.
Definition share_options.hpp:1372
Optional parameters for Azure::Storage::Files::Shares::ShareLeaseClient::Change.
Definition share_options.hpp:1358
Optional parameters for Azure::Storage::Files::Shares::ShareLeaseClient::Release.
Definition share_options.hpp:1365
Optional parameters for Azure::Storage::Files::Shares::ShareLeaseClient::Renew.
Definition share_options.hpp:1387