@Singleton public class S3BlobStore extends BaseBlobStore
blobUtils, context, defaultLocation, locations
Modifier | Constructor and Description |
---|---|
protected |
S3BlobStore(BlobStoreContext context,
BlobUtils blobUtils,
com.google.common.base.Supplier<Location> defaultLocation,
com.google.common.base.Supplier<Set<? extends Location>> locations,
S3Client sync,
com.google.common.base.Function<Set<BucketMetadata>,PageSet<? extends StorageMetadata>> convertBucketsToStorageMetadata,
ContainerToBucketListOptions container2BucketListOptions,
BucketToResourceList bucket2ResourceList,
ObjectToBlob object2Blob,
BlobToHttpGetOptions blob2ObjectGetOptions,
BlobToObject blob2Object,
ObjectToBlobMetadata object2BlobMd,
javax.inject.Provider<FetchBlobMetadata> fetchBlobMetadataProvider,
com.google.common.cache.LoadingCache<String,AccessControlList> bucketAcls) |
blobBuilder, clearContainer, clearContainer, countBlobs, countBlobs, createDirectory, deleteContainer, deleteDirectory, directoryExists, getBlob, getContext, list, listAssignableLocations
@Inject protected S3BlobStore(BlobStoreContext context, BlobUtils blobUtils, com.google.common.base.Supplier<Location> defaultLocation, com.google.common.base.Supplier<Set<? extends Location>> locations, S3Client sync, com.google.common.base.Function<Set<BucketMetadata>,PageSet<? extends StorageMetadata>> convertBucketsToStorageMetadata, ContainerToBucketListOptions container2BucketListOptions, BucketToResourceList bucket2ResourceList, ObjectToBlob object2Blob, BlobToHttpGetOptions blob2ObjectGetOptions, BlobToObject blob2Object, ObjectToBlobMetadata object2BlobMd, javax.inject.Provider<FetchBlobMetadata> fetchBlobMetadataProvider, com.google.common.cache.LoadingCache<String,AccessControlList> bucketAcls)
public PageSet<? extends StorageMetadata> list()
S3Client.listOwnedBuckets()
public boolean containerExists(String container)
S3Client.bucketExists(java.lang.String)
container
- bucket namepublic boolean createContainerInLocation(Location location, String container)
S3Client.putBucketInRegion(java.lang.String, java.lang.String, org.jclouds.s3.options.PutBucketOptions...)
location
- corresponds to a Regioncontainer
- bucket namepublic PageSet<? extends StorageMetadata> list(String container, ListContainerOptions options)
S3Client.listBucket(java.lang.String, org.jclouds.s3.options.ListBucketOptions...)
container
- bucket nameoptions
- size, recursion, and context of the listprotected void deletePathAndEnsureGone(String path)
BaseBlobStore.clearContainer(java.lang.String)
then S3Client.deleteBucketIfEmpty(java.lang.String)
until it is true.deletePathAndEnsureGone
in class BaseBlobStore
public boolean blobExists(String container, String key)
S3Client.objectExists(java.lang.String, java.lang.String)
container
- bucket namekey
- object keypublic BlobMetadata blobMetadata(String container, String key)
S3Client.headObject(java.lang.String, java.lang.String)
container
- bucket namekey
- object keypublic Blob getBlob(String container, String key, GetOptions optionsList)
S3Client.getObject(java.lang.String, java.lang.String, org.jclouds.http.options.GetOptions...)
container
- bucket namekey
- object keyoptionsList
- byte range or condition optionspublic String putBlob(String container, Blob blob)
S3Client.putObject(java.lang.String, org.jclouds.s3.domain.S3Object, org.jclouds.s3.options.PutObjectOptions...)
container
- bucket nameblob
- objectpublic String putBlob(String container, Blob blob, PutOptions overrides)
S3Client.putObject(java.lang.String, org.jclouds.s3.domain.S3Object, org.jclouds.s3.options.PutObjectOptions...)
container
- bucket nameblob
- objectoverrides
- byte range optionspublic void removeBlob(String container, String key)
S3Client.deleteObject(java.lang.String, java.lang.String)
container
- bucket namekey
- object keyprotected boolean deleteAndVerifyContainerGone(String container)
S3Utils.deleteAndVerifyContainerGone(org.jclouds.s3.S3Client, java.lang.String)
deleteAndVerifyContainerGone
in class BaseBlobStore
public boolean createContainerInLocation(Location location, String container, CreateContainerOptions options)
options
- controls default access controlBlobStore.createContainerInLocation(Location,String)
Copyright © 2009-2013 jclouds. All Rights Reserved.