/** * Changes the existing lease ID to the proposed lease ID. * * @param proposedLeaseId * A <code>String</code> that represents the proposed lease ID for the new lease, * or null if no lease ID is proposed. * * @param accessCondition * An {@link AccessCondition} object that represents the access conditions for the blob. The lease ID is * required to be set with an access condition. * @return A <code>String</code> that represents the new lease ID. * * @throws StorageException * If a storage service error occurred. */ @DoesServiceRequest public final String changeLease(final String proposedLeaseId, final AccessCondition accessCondition) throws StorageException { return this.changeLease(proposedLeaseId, accessCondition, null, null); }
/** * Changes the existing lease ID to the proposed lease ID. * * @param proposedLeaseId * A <code>String</code> that represents the proposed lease ID for the new lease, * or null if no lease ID is proposed. * * @param accessCondition * An {@link AccessCondition} object that represents the access conditions for the blob. The lease ID is * required to be set with an access condition. * @return A <code>String</code> that represents the new lease ID. * * @throws StorageException * If a storage service error occurred. */ @DoesServiceRequest public final String changeLease(final String proposedLeaseId, final AccessCondition accessCondition) throws StorageException { return this.changeLease(proposedLeaseId, accessCondition, null, null); }
leaseID2 = this.container.changeLease(proposedLeaseId, AccessCondition.generateLeaseCondition(leaseID1)); leaseID2 = this.container.changeLease(proposedLeaseId, AccessCondition.generateLeaseCondition(leaseID1)); leaseID2 = this.container.changeLease(proposedLeaseId, AccessCondition.generateLeaseCondition(leaseID2)); leaseID2 = this.container.changeLease(proposedLeaseId, AccessCondition.generateLeaseCondition(leaseID1)); leaseID2 = this.container.changeLease(proposedLeaseId2, AccessCondition.generateLeaseCondition(leaseID2)); try { this.container.changeLease(proposedLeaseId, AccessCondition.generateLeaseCondition(leaseID1)); this.container.changeLease(leaseID2, AccessCondition.generateLeaseCondition(leaseID2)); this.container.breakLease(60); try { this.container.changeLease(proposedLeaseId2, AccessCondition.generateLeaseCondition(leaseID1)); this.container.changeLease(proposedLeaseId, AccessCondition.generateLeaseCondition(leaseID1)); this.container.breakLease(0); try { this.container.changeLease(leaseID1, AccessCondition.generateLeaseCondition(leaseID1));