AccessCondition Class

Definition

Represents a set of access conditions to be used for operations against the storage services.

public class AccessCondition
Inheritance
java.lang.Object
AccessCondition

Constructors

AccessCondition()

Creates an instance of the class.

Methods

applyAppendConditionToRequest(final HttpURLConnection request)

RESERVED FOR INTERNAL USE. Applies the access condition to the request.

applyConditionToRequest(final HttpURLConnection request)

RESERVED FOR INTERNAL USE. Applies the access conditions to the request.

applyLeaseConditionToRequest(final HttpURLConnection request)

RESERVED FOR INTERNAL USE. Applies the lease access condition to the request.

applySequenceConditionToRequest(final HttpURLConnection request)

RESERVED FOR INTERNAL USE. Applies the sequence number access conditions to the request.

applySourceConditionToRequest(final HttpURLConnection request)

RESERVED FOR INTERNAL USE. Applies the source access conditions to the request.

generateEmptyCondition()

Generates a new empty AccessCondition.

For more information, see Specifying Conditional Headers for Blob Service Operations.

generateIfExistsCondition()

Returns an access condition such that an operation will be performed only if the resource exists on the service.

Setting this access condition modifies the request to include the HTTP If-Match conditional header.

For more information, see Specifying Conditional Headers for Blob Service Operations.

generateIfMatchCondition(final String etag)

Returns an access condition such that an operation will be performed only if the resource's ETag value matches the specified ETag value.

Setting this access condition modifies the request to include the HTTP If-Match conditional header. If this access condition is set, the operation is performed only if the ETag of the resource matches the specified ETag.

For more information, see Specifying Conditional Headers for Blob Service Operations.

generateIfModifiedSinceCondition(final Date lastMotified)

Returns an access condition such that an operation will be performed only if the resource has been modified since the specified time.

Setting this access condition modifies the request to include the HTTP If-Modified-Since conditional header. If this access condition is set, the operation is performed only if the resource has been modified since the specified time.

For more information, see Specifying Conditional Headers for Blob Service Operations.

generateIfNoneMatchCondition(final String etag)

Returns an access condition such that an operation will be performed only if the resource's ETag value does not match the specified ETag value.

Setting this access condition modifies the request to include the HTTP If-None-Match conditional header. If this access condition is set, the operation is performed only if the ETag of the resource does not match the specified ETag.

For more information, see Specifying Conditional Headers for Blob Service Operations.

generateIfNotExistsCondition()

Returns an access condition such that an operation will be performed only if the resource does not exist on the service.

Setting this access condition modifies the request to include the HTTP If-None-Match conditional header.

For more information, see Specifying Conditional Headers for Blob Service Operations.

generateIfNotModifiedSinceCondition(final Date lastMotified)

Returns an access condition such that an operation will be performed only if the resource has not been modified since the specified time.

Setting this access condition modifies the request to include the HTTP If-Unmodified-Since conditional header. If this access condition is set, the operation is performed only if the resource has not been modified since the specified time.

For more information, see Specifying Conditional Headers for Blob Service Operations.

generateIfSequenceNumberEqualCondition(long sequenceNumber)

Returns an access condition such that an operation will be performed only if resource's current sequence number is equal to the specified value. This condition only applies to page blobs.

generateIfSequenceNumberLessThanCondition(long sequenceNumber)

Returns an access condition such that an operation will be performed only if resource's current sequence number is less than the specified value. This condition only applies to page blobs.

generateIfSequenceNumberLessThanOrEqualCondition(long sequenceNumber)

Returns an access condition such that an operation will be performed only if resource's current sequence number is less than or equal to the specified value. This condition only applies to page blobs.

generateLeaseCondition(final String leaseID)

Returns an access condition such that an operation will be performed only if the resource is accessible under the specified lease ID.

For more information, see Specifying Conditional Headers for Blob Service Operations.

getIfAppendPositionEqual()

Gets the value for a conditional header used only for append operations. A number indicating the byte offset to check for. The append will succeed only if the end position is equal to this number.

getIfMatch()

Gets the ETag when the If-Match condition is set.

getIfMaxSizeLessThanOrEqual()

Gets the value for a conditional header used only for append operations. A number that indicates the maximum length in bytes to restrict the blob to when committing the block.

getIfModifiedSinceDate()

Gets the If-Modified-Since date.

getIfNoneMatch()

Gets the ETag when the If-None-Match condition is set.

getIfSequenceNumberEqual()

Gets the sequence number when the sequence number equal condition is set. This condition is only applicable to page blobs.

getIfSequenceNumberLessThan()

Gets the sequence number when the sequence number less than condition is set. This condition is only applicable to page blobs.

getIfSequenceNumberLessThanOrEqual()

Gets the sequence number when the sequence number less than or equal condition is set. This condition is only applicable to page blobs.

getIfUnmodifiedSinceDate()

Gets the If-Unmodified-Since date.

getLeaseID()

Gets the lease ID.

setIfAppendPositionEqual(Long ifAppendPositionEqual)

Sets the value for a conditional header used only for append operations. A number indicating the byte offset to check for. The append will succeed only if the end position is equal to this number.

setIfMatch(String etag)

Sets the ETag for the If-Match condition.

setIfMaxSizeLessThanOrEqual(Long ifMaxSizeLessThanOrEqual)

Sets the value for a conditional header used only for append operations. A number that indicates the maximum length in bytes to restrict the blob to when committing the block.

setIfModifiedSinceDate(Date ifModifiedSinceDate)

Sets the If-Modified-Since date.

setIfNoneMatch(String etag)

Sets the ETag for the If-None-Match condition.

setIfSequenceNumberEqual(Long sequenceNumber)

Sets the sequence number for the sequence number equal to condition. This condition is only applicable to page blobs.

setIfSequenceNumberLessThan(Long sequenceNumber)

Sets the sequence number for the sequence number less than condition. This condition is only applicable to page blobs.

setIfSequenceNumberLessThanOrEqual(Long sequenceNumber)

Sets the sequence number for the sequence number less than or equal to condition. This condition is only applicable to page blobs.

setIfUnmodifiedSinceDate(Date ifUnmodifiedSinceDate)

Sets the If-Unmodified-Since date.

setLeaseID(String leaseID)

Gets the lease ID.

verifyConditional(final String etag, final Date lastModified)

RESERVED FOR INTERNAL USE. Verifies the condition is satisfied.

Applies to