Package com.azure.storage.blob.options
Class BlobAcquireLeaseOptions
java.lang.Object
com.azure.storage.blob.options.BlobAcquireLeaseOptions
Extended options that may be passed when acquiring a lease to a blob or container.
-
Constructor Summary
ConstructorsConstructorDescriptionBlobAcquireLeaseOptions(int durationInSeconds) Creates a new instance ofBlobAcquireLeaseOptions. -
Method Summary
Modifier and TypeMethodDescriptionintGets the duration of the lease.Gets theBlobLeaseRequestConditions.setRequestConditions(BlobLeaseRequestConditions requestConditions) Sets theBlobLeaseRequestConditions.
-
Constructor Details
-
BlobAcquireLeaseOptions
public BlobAcquireLeaseOptions(int durationInSeconds) Creates a new instance ofBlobAcquireLeaseOptions.- Parameters:
durationInSeconds- The duration of the lease between 15 to 60 seconds or -1 for an infinite duration.
-
-
Method Details
-
getDuration
public int getDuration()Gets the duration of the lease.- Returns:
- The duration of the lease between 15 to 60 seconds or -1 for an infinite duration.
-
getRequestConditions
Gets theBlobLeaseRequestConditions.- Returns:
BlobLeaseRequestConditions
-
setRequestConditions
Sets theBlobLeaseRequestConditions.- Parameters:
requestConditions-BlobLeaseRequestConditions- Returns:
- The updated options.
-