Class BlobLeaseClientBuilder

java.lang.Object
com.azure.storage.blob.specialized.BlobLeaseClientBuilder

public final class BlobLeaseClientBuilder extends Object
This class provides a fluent builder API to help aid the configuration and instantiation of Storage Lease clients. Lease clients are able to interact with both container and blob clients and act as a supplement client. A new instance of BlobLeaseClient and BlobLeaseAsyncClient are constructed every time buildClient and buildAsyncClient are called respectively.

When a client is instantiated and a leaseId hasn't been set a UUID will be used as the lease identifier.

Instantiating LeaseClients

 BlobLeaseClient blobLeaseClient = new BlobLeaseClientBuilder()
     .blobClient(blobClient)
     .leaseId(leaseId)
     .buildClient();
 
 BlobLeaseClient blobLeaseClient = new BlobLeaseClientBuilder()
     .containerClient(blobContainerClient)
     .leaseId(leaseId)
     .buildClient();
 

Instantiating LeaseAsyncClients

 BlobLeaseAsyncClient blobLeaseAsyncClient = new BlobLeaseClientBuilder()
     .blobAsyncClient(blobAsyncClient)
     .leaseId(leaseId)
     .buildAsyncClient();
 
 BlobLeaseAsyncClient blobLeaseAsyncClient = new BlobLeaseClientBuilder()
     .containerAsyncClient(blobContainerAsyncClient)
     .leaseId(leaseId)
     .buildAsyncClient();
 
See Also: