Apache Jclouds BlobStore getBlob with GetOptions

220 Views Asked by At

Anyone knows how to get blob from blob store with GetOptions:

BlobStore blobStore = context.getBlobStore();
Blob blob = blobStore.getBlob(cloudStorageContainer, fileName);

what I wanted to achieve is to pass the ETag value to the org.jclouds.blobstore.options.GetOptions when calling BlobStore.getBlob() methods

1

There are 1 best solutions below

1
Andrew Gaul On BEST ANSWER

jclouds can conditionally get a blob based on its ETag via one of:

BlobStore.getBlob(containerName, blobName, new Getoptions().ifETagMatches(etag));
BlobStore.getBlob(containerName, blobName, new Getoptions().ifETagDoesntMatch(etag));