When a blob is created, the service returns a message like this (with some parts elided)
HTTP/1.1 201 Created
Last-Modified: Thu, 17 May 2012 17:54:50 GMT
ETag: "0x8CF026D4A29F829"
The ETag is especially important, because that allows you to ensure that the blob is in the state you think it should be in. For example, if after creating the blob, you want to set some metadata, and you want to be sure that the blob has not been altered by anyone else in the meantime, you would use code like this:
service.setBlobMetadata(container, blob, metadata,
new SetBlobMetadataOptions()
.setAccessCondition(AccessCondition.ifMatch(etag));
However, the createBlockBlob is a void method; it returns nothing. So you cannot pass the ETag, and you lose confidence that you are the only one touching the blob. (Reading the blob to get the ETag won't help, because you will have the same latency as just setting the metadata blindly.)
Same issue affects the createBlockBlob and copyBlob methods.
When a blob is created, the service returns a message like this (with some parts elided)
The ETag is especially important, because that allows you to ensure that the blob is in the state you think it should be in. For example, if after creating the blob, you want to set some metadata, and you want to be sure that the blob has not been altered by anyone else in the meantime, you would use code like this:
However, the createBlockBlob is a void method; it returns nothing. So you cannot pass the ETag, and you lose confidence that you are the only one touching the blob. (Reading the blob to get the ETag won't help, because you will have the same latency as just setting the metadata blindly.)
Same issue affects the createBlockBlob and copyBlob methods.