org.jclouds.atmos.blobstore
Class AtmosBlobStore
java.lang.Object
org.jclouds.blobstore.internal.BaseBlobStore
org.jclouds.atmos.blobstore.AtmosBlobStore
- All Implemented Interfaces:
- BlobStore
@Singleton
public class AtmosBlobStore
- extends BaseBlobStore
- Author:
- Adrian Cole
|
Method Summary |
boolean |
blobExists(String container,
String key)
This implementation invokes AtmosClient.pathExists(java.lang.String) |
BlobMetadata |
blobMetadata(String container,
String key)
This implementation invokes AtmosClient.headFile(java.lang.String) |
boolean |
containerExists(String container)
This implementation invokes AtmosClient.pathExists(java.lang.String) |
boolean |
createContainerInLocation(Location location,
String container)
This implementation invokes AtmosClient.createDirectory(java.lang.String, org.jclouds.atmos.options.PutOptions...) |
boolean |
createContainerInLocation(Location location,
String container,
CreateContainerOptions options)
|
void |
createDirectory(String container,
String directory)
This implementation invokes AtmosClient.createDirectory(java.lang.String, org.jclouds.atmos.options.PutOptions...) |
protected boolean |
deleteAndVerifyContainerGone(String container)
This implementation invokes AtmosAsyncClient.deletePath(java.lang.String) followed by
AtmosAsyncClient.pathExists(java.lang.String) until it is true. |
void |
deleteDirectory(String containerName,
String directory)
This implementation invokes removeBlob(java.lang.String, java.lang.String) |
boolean |
directoryExists(String container,
String directory)
This implementation invokes AtmosClient.pathExists(java.lang.String) |
Blob |
getBlob(String container,
String key,
GetOptions options)
This implementation invokes AtmosClient.readFile(java.lang.String, org.jclouds.http.options.GetOptions...) |
PageSet<? extends StorageMetadata> |
list()
This implementation invokes AtmosClient.listDirectories(org.jclouds.atmos.options.ListOptions...) |
PageSet<? extends StorageMetadata> |
list(String container,
ListContainerOptions options)
This implementation invokes AtmosClient.listDirectory(java.lang.String, org.jclouds.atmos.options.ListOptions...) |
String |
putBlob(String container,
Blob blob)
This implementation invokes AtmosClient.createFile(java.lang.String, org.jclouds.atmos.domain.AtmosObject, org.jclouds.atmos.options.PutOptions...)
Since there is no etag support in atmos, we just return the path. |
String |
putBlob(String container,
Blob blob,
PutOptions options)
This implementation invokes AtmosClient.createFile(java.lang.String, org.jclouds.atmos.domain.AtmosObject, org.jclouds.atmos.options.PutOptions...)
Since there is no etag support in atmos, we just return the path. |
void |
removeBlob(String container,
String key)
This implementation invokes AtmosClient.deletePath(java.lang.String) |
| Methods inherited from class org.jclouds.blobstore.internal.BaseBlobStore |
blobBuilder, clearAndDeleteContainer, clearContainer, clearContainer, countBlobs, countBlobs, deleteContainer, getBlob, getContext, list, listAssignableLocations |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
blobMetadata
public BlobMetadata blobMetadata(String container,
String key)
- This implementation invokes
AtmosClient.headFile(java.lang.String)
- Parameters:
container - container where this exists.key - fully qualified name relative to the container.
- Returns:
- null if name isn't present or the blob you intended to receive.
deleteAndVerifyContainerGone
protected boolean deleteAndVerifyContainerGone(String container)
- This implementation invokes
AtmosAsyncClient.deletePath(java.lang.String) followed by
AtmosAsyncClient.pathExists(java.lang.String) until it is true.
- Specified by:
deleteAndVerifyContainerGone in class BaseBlobStore
createContainerInLocation
public boolean createContainerInLocation(Location location,
String container)
- This implementation invokes
AtmosClient.createDirectory(java.lang.String, org.jclouds.atmos.options.PutOptions...)
- Parameters:
location - currently ignoredcontainer - directory name
- Returns:
- true if the container was created, false if it already existed.
createDirectory
public void createDirectory(String container,
String directory)
- This implementation invokes
AtmosClient.createDirectory(java.lang.String, org.jclouds.atmos.options.PutOptions...)
- Specified by:
createDirectory in interface BlobStore- Overrides:
createDirectory in class BaseBlobStore
- Parameters:
container - directory namedirectory - virtual path
deleteDirectory
public void deleteDirectory(String containerName,
String directory)
- This implementation invokes
removeBlob(java.lang.String, java.lang.String)
- Specified by:
deleteDirectory in interface BlobStore- Overrides:
deleteDirectory in class BaseBlobStore
containerExists
public boolean containerExists(String container)
- This implementation invokes
AtmosClient.pathExists(java.lang.String)
directoryExists
public boolean directoryExists(String container,
String directory)
- This implementation invokes
AtmosClient.pathExists(java.lang.String)
- Specified by:
directoryExists in interface BlobStore- Overrides:
directoryExists in class BaseBlobStore
- Parameters:
container - container where the directory residesdirectory - virtual path
blobExists
public boolean blobExists(String container,
String key)
- This implementation invokes
AtmosClient.pathExists(java.lang.String)
- Parameters:
container - containerkey - file name
getBlob
public Blob getBlob(String container,
String key,
GetOptions options)
- This implementation invokes
AtmosClient.readFile(java.lang.String, org.jclouds.http.options.GetOptions...)
- Parameters:
container - container where this exists.key - fully qualified name relative to the container.options - byte range or condition options
- Returns:
- the blob you intended to receive or null, if it doesn't exist.
list
public PageSet<? extends StorageMetadata> list()
- This implementation invokes
AtmosClient.listDirectories(org.jclouds.atmos.options.ListOptions...)
list
public PageSet<? extends StorageMetadata> list(String container,
ListContainerOptions options)
- This implementation invokes
AtmosClient.listDirectory(java.lang.String, org.jclouds.atmos.options.ListOptions...)
- Parameters:
container - what to listoptions - size, recursion, and context of the list
- Returns:
- a list that may be incomplete, depending on whether PageSet#getNextMarker is set
putBlob
public String putBlob(String container,
Blob blob)
- This implementation invokes
AtmosClient.createFile(java.lang.String, org.jclouds.atmos.domain.AtmosObject, org.jclouds.atmos.options.PutOptions...)
Since there is no etag support in atmos, we just return the path.
- Parameters:
container - container to place the blob.blob - fully qualified name relative to the container.
- 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
AtmosClient.createFile(java.lang.String, org.jclouds.atmos.domain.AtmosObject, org.jclouds.atmos.options.PutOptions...)
Since there is no etag support in atmos, we just return the path.
- Parameters:
container - container to place the blob.blob - fully qualified name relative to the container.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
AtmosClient.deletePath(java.lang.String)
- Parameters:
container - container where this exists.key - fully qualified name relative to the container.
createContainerInLocation
public boolean createContainerInLocation(Location location,
String container,
CreateContainerOptions options)
options - controls default access control- See Also:
BlobStore.createContainerInLocation(Location,String)
Copyright © 2009-2012 jclouds. All Rights Reserved.