Class ShareAcquireLeaseOptions

java.lang.Object
com.azure.storage.file.share.options.ShareAcquireLeaseOptions

public class ShareAcquireLeaseOptions extends Object
Extended options that may be passed when acquiring a lease to a file or share.
  • Constructor Details

    • ShareAcquireLeaseOptions

      public ShareAcquireLeaseOptions()
      Creates a new options object with an infinite duration.
  • Method Details

    • getDuration

      public int getDuration()
      Returns:
      The duration of the lease between 15 to 60 seconds or -1 for an infinite duration.
    • setDuration

      public ShareAcquireLeaseOptions setDuration(int duration)
      Parameters:
      duration - The duration of the lease between 15 to 60 seconds or -1 for an infinite duration. Note: Share files only support infinite lease.
      Returns:
      The updated options.