@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,
BucketToResourceMetadata bucket2ResourceMd,
ContainerToBucketListOptions container2BucketListOptions,
BucketToResourceList bucket2ResourceList,
ObjectToBlob object2Blob,
BlobToHttpGetOptions blob2ObjectGetOptions,
BlobToObject blob2Object,
ObjectToBlobMetadata object2BlobMd,
Provider<FetchBlobMetadata> fetchBlobMetadataProvider,
com.google.common.cache.LoadingCache<String,AccessControlList> bucketAcls) |
blobBuilder, clearContainer, clearContainer, countBlobs, countBlobs, createDirectory, 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, BucketToResourceMetadata bucket2ResourceMd, ContainerToBucketListOptions container2BucketListOptions, BucketToResourceList bucket2ResourceList, ObjectToBlob object2Blob, BlobToHttpGetOptions blob2ObjectGetOptions, BlobToObject blob2Object, ObjectToBlobMetadata object2BlobMd, 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 listpublic void deleteContainer(String container)
#deleteAndEnsurePathGone
deleteContainer
in interface BlobStore
deleteContainer
in class BaseBlobStore
container
- bucket namepublic void clearAndDeleteContainer(String container)
BaseBlobStore.clearContainer(java.lang.String)
then S3Client.deleteBucketIfEmpty(java.lang.String)
until it is true.clearAndDeleteContainer
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-2012 jclouds. All Rights Reserved.