org.jclouds.azureblob.blobstore
Class AzureBlobStore

java.lang.Object
  extended by org.jclouds.blobstore.internal.BaseBlobStore
      extended by org.jclouds.azureblob.blobstore.AzureBlobStore
All Implemented Interfaces:
BlobStore

@Singleton
public class AzureBlobStore
extends BaseBlobStore

Author:
Adrian Cole

Field Summary
 
Fields inherited from class org.jclouds.blobstore.internal.BaseBlobStore
blobUtils, context, defaultLocation, locations
 
Method Summary
 boolean blobExists(String container, String key)
          This implementation invokes AzureBlobClient.blobExists(java.lang.String, java.lang.String)
 BlobMetadata blobMetadata(String container, String key)
          This implementation invokes AzureBlobClient.getBlobProperties(java.lang.String, java.lang.String)
 boolean containerExists(String container)
          This implementation invokes AzureBlobClient#bucketExists
 boolean createContainerInLocation(Location location, String container)
          This implementation invokes AzureBlobClient#putBucketInRegion
 boolean createContainerInLocation(Location location, String container, CreateContainerOptions options)
           
protected  boolean deleteAndVerifyContainerGone(String container)
           
 void deleteContainer(String container)
          This implementation invokes AzureBlobClient.deleteContainer(java.lang.String)
 Blob getBlob(String container, String key, GetOptions options)
          This implementation invokes AzureBlobClient.getBlob(java.lang.String, java.lang.String, org.jclouds.http.options.GetOptions...)
 PageSet<? extends StorageMetadata> list()
          This implementation invokes AzureBlobClient.listContainers(org.jclouds.azure.storage.options.ListOptions...)
 PageSet<? extends StorageMetadata> list(String container, ListContainerOptions options)
          This implementation invokes AzureBlobClient.listBlobs(java.lang.String, org.jclouds.azureblob.options.ListBlobsOptions...)
 String putBlob(String container, Blob blob)
          This implementation invokes AzureBlobClient#putObject
 String putBlob(String container, Blob blob, PutOptions options)
          This implementation invokes AzureBlobClient#putObject
 void removeBlob(String container, String key)
          This implementation invokes AzureBlobClient#deleteObject
 
Methods inherited from class org.jclouds.blobstore.internal.BaseBlobStore
blobBuilder, clearAndDeleteContainer, clearContainer, clearContainer, countBlobs, countBlobs, createDirectory, deleteDirectory, directoryExists, getBlob, getContext, list, listAssignableLocations, newBlob
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

list

public PageSet<? extends StorageMetadata> list()
This implementation invokes AzureBlobClient.listContainers(org.jclouds.azure.storage.options.ListOptions...)


containerExists

public boolean containerExists(String container)
This implementation invokes AzureBlobClient#bucketExists

Parameters:
container - container name

createContainerInLocation

public boolean createContainerInLocation(Location location,
                                         String container)
This implementation invokes AzureBlobClient#putBucketInRegion

Parameters:
location - currently ignored
container - container name
Returns:
true if the container was created, false if it already existed.

list

public PageSet<? extends StorageMetadata> list(String container,
                                               ListContainerOptions options)
This implementation invokes AzureBlobClient.listBlobs(java.lang.String, org.jclouds.azureblob.options.ListBlobsOptions...)

Parameters:
container - container name
options - size, recursion, and context of the list
Returns:
a list that may be incomplete, depending on whether PageSet#getNextMarker is set

deleteContainer

public void deleteContainer(String container)
This implementation invokes AzureBlobClient.deleteContainer(java.lang.String)

Specified by:
deleteContainer in interface BlobStore
Overrides:
deleteContainer in class BaseBlobStore
Parameters:
container - container name

blobExists

public boolean blobExists(String container,
                          String key)
This implementation invokes AzureBlobClient.blobExists(java.lang.String, java.lang.String)

Parameters:
container - container name
key - blob key

getBlob

public Blob getBlob(String container,
                    String key,
                    GetOptions options)
This implementation invokes AzureBlobClient.getBlob(java.lang.String, java.lang.String, org.jclouds.http.options.GetOptions...)

Parameters:
container - container name
key - blob key
options - byte range or condition options
Returns:
the blob you intended to receive or null, if it doesn't exist.

putBlob

public String putBlob(String container,
                      Blob blob)
This implementation invokes AzureBlobClient#putObject

Parameters:
container - container name
blob - object
Returns:
etag of the blob you uploaded, possibly null where etags are unsupported

putBlob

public String putBlob(String container,
                      Blob blob,
                      PutOptions options)
This implementation invokes AzureBlobClient#putObject

Parameters:
container - container name
blob - object
options - byte range options
Returns:
etag of the blob you uploaded, possibly null where etags are unsupported

removeBlob

public void removeBlob(String container,
                       String key)
This implementation invokes AzureBlobClient#deleteObject

Parameters:
container - container name
key - blob key

blobMetadata

public BlobMetadata blobMetadata(String container,
                                 String key)
This implementation invokes AzureBlobClient.getBlobProperties(java.lang.String, java.lang.String)

Parameters:
container - container name
key - blob key
Returns:
null if name isn't present or the blob you intended to receive.

deleteAndVerifyContainerGone

protected boolean deleteAndVerifyContainerGone(String container)
Specified by:
deleteAndVerifyContainerGone in class BaseBlobStore

createContainerInLocation

public boolean createContainerInLocation(Location location,
                                         String container,
                                         CreateContainerOptions options)
options - controls default access control
See Also:
BlobStore.createContainerInLocation(Location,String)


Copyright © 2009-2011 jclouds. All Rights Reserved.