org.jclouds.s3.blobstore
Class S3AsyncBlobStore

java.lang.Object
  extended by org.jclouds.blobstore.internal.BaseAsyncBlobStore
      extended by org.jclouds.s3.blobstore.S3AsyncBlobStore
All Implemented Interfaces:
AsyncBlobStore
Direct Known Subclasses:
AWSS3AsyncBlobStore

@Singleton
public class S3AsyncBlobStore
extends BaseAsyncBlobStore

Author:
Adrian Cole

Field Summary
 
Fields inherited from class org.jclouds.blobstore.internal.BaseAsyncBlobStore
blobUtils, context, defaultLocation, locations, service
 
Constructor Summary
protected S3AsyncBlobStore(BlobStoreContext context, BlobUtils blobUtils, ExecutorService service, com.google.common.base.Supplier<Location> defaultLocation, com.google.common.base.Supplier<Set<? extends Location>> locations, S3AsyncClient async, S3Client sync, BucketToResourceMetadata bucket2ResourceMd, ContainerToBucketListOptions container2BucketListOptions, BucketToResourceList bucket2ResourceList, ObjectToBlob object2Blob, BlobToHttpGetOptions blob2ObjectGetOptions, BlobToObject blob2Object, ObjectToBlobMetadata object2BlobMd, javax.inject.Provider<FetchBlobMetadata> fetchBlobMetadataProvider, Map<String,AccessControlList> bucketAcls)
           
 
Method Summary
 com.google.common.util.concurrent.ListenableFuture<Boolean> blobExists(String container, String key)
          This implementation invokes S3AsyncClient.objectExists(java.lang.String, java.lang.String)
 com.google.common.util.concurrent.ListenableFuture<BlobMetadata> blobMetadata(String container, String key)
          This implementation invokes S3AsyncClient.headObject(java.lang.String, java.lang.String)
 com.google.common.util.concurrent.ListenableFuture<Boolean> containerExists(String container)
          This implementation invokes S3AsyncClient.bucketExists(java.lang.String)
 com.google.common.util.concurrent.ListenableFuture<Boolean> createContainerInLocation(Location location, String container)
          This implementation invokes S3AsyncClient.putBucketInRegion(java.lang.String, java.lang.String, org.jclouds.s3.options.PutBucketOptions...)
 com.google.common.util.concurrent.ListenableFuture<Boolean> createContainerInLocation(Location location, String container, CreateContainerOptions options)
           
protected  boolean deleteAndVerifyContainerGone(String container)
          This implementation invokes S3Utils.deleteAndVerifyContainerGone(org.jclouds.s3.S3Client, java.lang.String)
 com.google.common.util.concurrent.ListenableFuture<Blob> getBlob(String container, String key, GetOptions options)
          This implementation invokes S3AsyncClient.getObject(java.lang.String, java.lang.String, org.jclouds.http.options.GetOptions...)
 com.google.common.util.concurrent.ListenableFuture<PageSet<? extends StorageMetadata>> list()
          This implementation invokes S3AsyncClient.listOwnedBuckets()
 com.google.common.util.concurrent.ListenableFuture<PageSet<? extends StorageMetadata>> list(String container, ListContainerOptions options)
          This implementation invokes S3AsyncClient.listBucket(java.lang.String, org.jclouds.s3.options.ListBucketOptions...)
 com.google.common.util.concurrent.ListenableFuture<String> putBlob(String container, Blob blob)
          This implementation invokes S3AsyncClient.putObject(java.lang.String, org.jclouds.s3.domain.S3Object, org.jclouds.s3.options.PutObjectOptions...)
 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 S3AsyncClient.deleteObject(java.lang.String, java.lang.String)
 
Methods inherited from class org.jclouds.blobstore.internal.BaseAsyncBlobStore
blobBuilder, clearContainer, clearContainer, countBlobs, countBlobs, createDirectory, deleteAndEnsurePathGone, deleteContainer, 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
 

Constructor Detail

S3AsyncBlobStore

@Inject
protected S3AsyncBlobStore(BlobStoreContext context,
                                  BlobUtils blobUtils,
                                  @Named(value="jclouds.user-threads")
                                  ExecutorService service,
                                  com.google.common.base.Supplier<Location> defaultLocation,
                                  com.google.common.base.Supplier<Set<? extends Location>> locations,
                                  S3AsyncClient async,
                                  S3Client sync,
                                  BucketToResourceMetadata bucket2ResourceMd,
                                  ContainerToBucketListOptions container2BucketListOptions,
                                  BucketToResourceList bucket2ResourceList,
                                  ObjectToBlob object2Blob,
                                  BlobToHttpGetOptions blob2ObjectGetOptions,
                                  BlobToObject blob2Object,
                                  ObjectToBlobMetadata object2BlobMd,
                                  javax.inject.Provider<FetchBlobMetadata> fetchBlobMetadataProvider,
                                  Map<String,AccessControlList> bucketAcls)
Method Detail

list

public com.google.common.util.concurrent.ListenableFuture<PageSet<? extends StorageMetadata>> list()
This implementation invokes S3AsyncClient.listOwnedBuckets()

See Also:
BlobStore.list()

containerExists

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

Parameters:
container - bucket name
See Also:
BlobStore.containerExists(java.lang.String)

createContainerInLocation

public com.google.common.util.concurrent.ListenableFuture<Boolean> createContainerInLocation(Location location,
                                                                                             String container)
This implementation invokes S3AsyncClient.putBucketInRegion(java.lang.String, java.lang.String, org.jclouds.s3.options.PutBucketOptions...)

Parameters:
location - corresponds to Region
container - bucket name
See Also:
BlobStore.createContainerInLocation(Location, String)

list

public com.google.common.util.concurrent.ListenableFuture<PageSet<? extends StorageMetadata>> list(String container,
                                                                                                   ListContainerOptions options)
This implementation invokes S3AsyncClient.listBucket(java.lang.String, org.jclouds.s3.options.ListBucketOptions...)

Parameters:
container - bucket name
See Also:
BlobStore.list(String, ListContainerOptions)

deleteAndVerifyContainerGone

protected boolean deleteAndVerifyContainerGone(String container)
This implementation invokes S3Utils.deleteAndVerifyContainerGone(org.jclouds.s3.S3Client, java.lang.String)

Specified by:
deleteAndVerifyContainerGone in class BaseAsyncBlobStore

blobExists

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

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

blobMetadata

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

Parameters:
container - bucket name
key - object key
See Also:
BlobStore.blobMetadata(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 S3AsyncClient.getObject(java.lang.String, java.lang.String, org.jclouds.http.options.GetOptions...)

Parameters:
container - bucket name
key - object key
See Also:
BlobStore.getBlob(String, String, GetOptions)

putBlob

public com.google.common.util.concurrent.ListenableFuture<String> putBlob(String container,
                                                                          Blob blob)
This implementation invokes S3AsyncClient.putObject(java.lang.String, org.jclouds.s3.domain.S3Object, org.jclouds.s3.options.PutObjectOptions...)

Parameters:
container - bucket name
blob - object
See Also:
BlobStore.putBlob(String,Blob)

removeBlob

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

Parameters:
container - bucket name
key - object key
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.