org.jclouds.atmos.blobstore
Class AtmosAsyncBlobStore

java.lang.Object
  extended by org.jclouds.blobstore.internal.BaseAsyncBlobStore
      extended by org.jclouds.atmos.blobstore.AtmosAsyncBlobStore
All Implemented Interfaces:
AsyncBlobStore

@Singleton
public class AtmosAsyncBlobStore
extends BaseAsyncBlobStore

Author:
Adrian Cole

Field Summary
 
Fields inherited from class org.jclouds.blobstore.internal.BaseAsyncBlobStore
blobUtils, context, defaultLocation, locations, service
 
Method Summary
 com.google.common.util.concurrent.ListenableFuture<Boolean> blobExists(String container, String key)
          This implementation invokes AtmosAsyncClient.pathExists(java.lang.String)
 com.google.common.util.concurrent.ListenableFuture<BlobMetadata> blobMetadata(String container, String key)
          This implementation invokes AtmosAsyncClient.headFile(java.lang.String)
 com.google.common.util.concurrent.ListenableFuture<Boolean> containerExists(String container)
          This implementation invokes AtmosAsyncClient.pathExists(java.lang.String)
 com.google.common.util.concurrent.ListenableFuture<Boolean> createContainerInLocation(Location location, String container)
          This implementation invokes AtmosAsyncClient.createDirectory(java.lang.String, org.jclouds.atmos.options.PutOptions...)

Note location is ignored

 com.google.common.util.concurrent.ListenableFuture<Boolean> createContainerInLocation(Location location, String container, CreateContainerOptions options)
           
 com.google.common.util.concurrent.ListenableFuture<Void> createDirectory(String container, String directory)
          This implementation invokes AtmosAsyncClient.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.
 com.google.common.util.concurrent.ListenableFuture<Void> deleteDirectory(String containerName, String directory)
          This implementation invokes removeBlob(java.lang.String, java.lang.String)
 com.google.common.util.concurrent.ListenableFuture<Boolean> directoryExists(String container, String directory)
          This implementation invokes AtmosAsyncClient.pathExists(java.lang.String)
 com.google.common.util.concurrent.ListenableFuture<Blob> getBlob(String container, String key, GetOptions options)
          This implementation invokes AtmosAsyncClient.readFile(java.lang.String, org.jclouds.http.options.GetOptions...)
 com.google.common.util.concurrent.ListenableFuture<PageSet<? extends StorageMetadata>> list()
          This implementation invokes AtmosAsyncClient.listDirectories(org.jclouds.atmos.options.ListOptions...)
 com.google.common.util.concurrent.ListenableFuture<PageSet<? extends StorageMetadata>> list(String container, ListContainerOptions options)
          This implementation invokes AtmosAsyncClient.listDirectory(java.lang.String, org.jclouds.atmos.options.ListOptions...)
 com.google.common.util.concurrent.ListenableFuture<String> putBlob(String container, Blob blob)
          This implementation invokes AtmosAsyncClient.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.

 com.google.common.util.concurrent.ListenableFuture<String> putBlob(String container, Blob blob, PutOptions options)
           
 com.google.common.util.concurrent.ListenableFuture<Void> removeBlob(String container, String key)
          This implementation invokes AtmosAsyncClient.deletePath(java.lang.String)
 
Methods inherited from class org.jclouds.blobstore.internal.BaseAsyncBlobStore
blobBuilder, clearContainer, clearContainer, countBlobs, countBlobs, deleteAndEnsurePathGone, deleteContainer, 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

blobMetadata

public com.google.common.util.concurrent.ListenableFuture<BlobMetadata> blobMetadata(String container,
                                                                                     String key)
This implementation invokes AtmosAsyncClient.headFile(java.lang.String)

See Also:
BlobStore.blobMetadata(java.lang.String, java.lang.String)

createContainerInLocation

public com.google.common.util.concurrent.ListenableFuture<Boolean> createContainerInLocation(Location location,
                                                                                             String container)
This implementation invokes AtmosAsyncClient.createDirectory(java.lang.String, org.jclouds.atmos.options.PutOptions...)

Note location is ignored

See Also:
BlobStore.createContainerInLocation(Location, String)

createDirectory

public com.google.common.util.concurrent.ListenableFuture<Void> createDirectory(String container,
                                                                                String directory)
This implementation invokes AtmosAsyncClient.createDirectory(java.lang.String, org.jclouds.atmos.options.PutOptions...)

Specified by:
createDirectory in interface AsyncBlobStore
Overrides:
createDirectory in class BaseAsyncBlobStore
directory - virtual path
See Also:
BlobStore.createDirectory(java.lang.String, java.lang.String)

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 BaseAsyncBlobStore

containerExists

public com.google.common.util.concurrent.ListenableFuture<Boolean> containerExists(String container)
This implementation invokes AtmosAsyncClient.pathExists(java.lang.String)

See Also:
BlobStore.containerExists(java.lang.String)

directoryExists

public com.google.common.util.concurrent.ListenableFuture<Boolean> directoryExists(String container,
                                                                                   String directory)
This implementation invokes AtmosAsyncClient.pathExists(java.lang.String)

Specified by:
directoryExists in interface AsyncBlobStore
Overrides:
directoryExists in class BaseAsyncBlobStore
directory - virtual path
See Also:
BlobStore.directoryExists(java.lang.String, java.lang.String)

deleteDirectory

public com.google.common.util.concurrent.ListenableFuture<Void> deleteDirectory(String containerName,
                                                                                String directory)
This implementation invokes removeBlob(java.lang.String, java.lang.String)

Specified by:
deleteDirectory in interface AsyncBlobStore
Overrides:
deleteDirectory in class BaseAsyncBlobStore
See Also:
BlobStore.deleteDirectory(java.lang.String, java.lang.String)

blobExists

public com.google.common.util.concurrent.ListenableFuture<Boolean> blobExists(String container,
                                                                              String key)
This implementation invokes AtmosAsyncClient.pathExists(java.lang.String)

Parameters:
container - container
key - file name
See Also:
BlobStore.blobExists(java.lang.String, java.lang.String)

getBlob

public com.google.common.util.concurrent.ListenableFuture<Blob> getBlob(String container,
                                                                        String key,
                                                                        GetOptions options)
This implementation invokes AtmosAsyncClient.readFile(java.lang.String, org.jclouds.http.options.GetOptions...)

See Also:
BlobStore.getBlob(String, String, GetOptions)

list

public com.google.common.util.concurrent.ListenableFuture<PageSet<? extends StorageMetadata>> list()
This implementation invokes AtmosAsyncClient.listDirectories(org.jclouds.atmos.options.ListOptions...)

See Also:
BlobStore.list()

list

public com.google.common.util.concurrent.ListenableFuture<PageSet<? extends StorageMetadata>> list(String container,
                                                                                                   ListContainerOptions options)
This implementation invokes AtmosAsyncClient.listDirectory(java.lang.String, org.jclouds.atmos.options.ListOptions...)

See Also:
BlobStore.list(String, ListContainerOptions)

putBlob

public com.google.common.util.concurrent.ListenableFuture<String> putBlob(String container,
                                                                          Blob blob)
This implementation invokes AtmosAsyncClient.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.

See Also:
BlobStore.putBlob(String,Blob)

removeBlob

public com.google.common.util.concurrent.ListenableFuture<Void> removeBlob(String container,
                                                                           String key)
This implementation invokes AtmosAsyncClient.deletePath(java.lang.String)

See Also:
BlobStore.removeBlob(java.lang.String, java.lang.String)

putBlob

public com.google.common.util.concurrent.ListenableFuture<String> putBlob(String container,
                                                                          Blob blob,
                                                                          PutOptions options)
See Also:
BlobStore.putBlob(String,Blob,PutOptions)

createContainerInLocation

public com.google.common.util.concurrent.ListenableFuture<Boolean> createContainerInLocation(Location location,
                                                                                             String container,
                                                                                             CreateContainerOptions options)
See Also:
BlobStore.createContainerInLocation(Location,String,CreateContainerOptions)


Copyright © 2009-2011 jclouds. All Rights Reserved.