ShareBreakLeaseOptions Class

  • java.lang.Object
    • com.azure.storage.file.share.options.ShareBreakLeaseOptions

public class ShareBreakLeaseOptions

Extended options that may be passed when breaking a lease to a file or share.

Constructor Summary

Constructor Description
ShareBreakLeaseOptions()

Creates a new instance of ShareBreakLeaseOptions.

Method Summary

Modifier and Type Method and Description
Duration getBreakPeriod()

Gets the break period for the lease.

ShareBreakLeaseOptions setBreakPeriod(Duration breakPeriod)

Sets the break period for the lease.

Methods inherited from java.lang.Object

Constructor Details

ShareBreakLeaseOptions

public ShareBreakLeaseOptions()

Creates a new instance of ShareBreakLeaseOptions.

Method Details

getBreakPeriod

public Duration getBreakPeriod()

Gets the break period for the lease.

Returns:

An optional duration, between 0 and 60 seconds, that the lease should continue before it is broken. If the break period is longer than the time remaining on the lease the remaining time on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period.

setBreakPeriod

public ShareBreakLeaseOptions setBreakPeriod(Duration breakPeriod)

Sets the break period for the lease.

Parameters:

breakPeriod - An optional duration, between 0 and 60 seconds, that the lease should continue before it is broken. If the break period is longer than the time remaining on the lease the remaining time on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period.

Returns:

The updated options.

Applies to