@Singleton public class S3BlobStore extends BaseBlobStore
Modifier and Type | Field and Description |
---|---|
protected javax.inject.Provider<MultipartUploadStrategy> |
multipartUploadStrategy |
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,
javax.inject.Provider<MultipartUploadStrategy> multipartUploadStrategy) |
blobBuilder, clearContainer, clearContainer, countBlobs, countBlobs, createDirectory, deleteContainer, deleteContainerIfEmpty, deleteDirectory, directoryExists, getBlob, getContext, list, listAssignableLocations
protected final javax.inject.Provider<MultipartUploadStrategy> multipartUploadStrategy
@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, javax.inject.Provider<MultipartUploadStrategy> multipartUploadStrategy)
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 ContainerAccess getContainerAccess(String container)
public void setContainerAccess(String container, ContainerAccess access)
public 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 String copyBlob(String fromContainer, String fromName, String toContainer, String toName, CopyOptions options)
BlobStore
copyBlob
in interface BlobStore
copyBlob
in class BaseBlobStore
public void removeBlob(String container, String key)
S3Client.deleteObject(java.lang.String, java.lang.String)
container
- bucket namekey
- object keypublic void removeBlobs(String container, Iterable<String> keys)
BlobStore
Blob
s representing the data at location container/name
removeBlobs
in interface BlobStore
removeBlobs
in class BaseBlobStore
container
- container where this exists.keys
- fully qualified names relative to the container.public BlobAccess getBlobAccess(String container, String name)
public void setBlobAccess(String container, String name, BlobAccess access)
protected boolean deleteAndVerifyContainerGone(String container)
S3Utils.deleteAndVerifyContainerGone(org.jclouds.s3.S3Client, java.lang.String)
deleteAndVerifyContainerGone
in class BaseBlobStore
container
- what to deletepublic boolean createContainerInLocation(Location location, String container, CreateContainerOptions options)
options
- controls default access controlBlobStore.createContainerInLocation(Location,String)
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.