@Singleton public class AtmosBlobStore extends BaseBlobStore
blobUtils, context, defaultLocation, locations, slicer
blobBuilder, clearContainer, clearContainer, countBlobs, countBlobs, deleteContainer, deleteContainerIfEmpty, deletePathAndEnsureGone, downloadBlob, downloadBlob, getBlob, getContext, list, listAssignableLocations, putMultipartBlob, putMultipartBlob, removeBlobs, streamBlob
public BlobMetadata blobMetadata(String container, String key)
AtmosClient.headFile(java.lang.String)
container
- container where this exists.key
- fully qualified name relative to the container.protected boolean deleteAndVerifyContainerGone(String container)
AtmosClient.deletePath(java.lang.String)
followed by
AtmosClient.pathExists(java.lang.String)
until it is true.deleteAndVerifyContainerGone
in class BaseBlobStore
container
- what to deletepublic boolean createContainerInLocation(Location location, String container)
AtmosClient.createDirectory(java.lang.String, org.jclouds.atmos.options.PutOptions...)
location
- currently ignoredcontainer
- directory namepublic ContainerAccess getContainerAccess(String container)
public void setContainerAccess(String container, ContainerAccess access)
public void createDirectory(String container, String directory)
AtmosClient.createDirectory(java.lang.String, org.jclouds.atmos.options.PutOptions...)
createDirectory
in interface BlobStore
createDirectory
in class BaseBlobStore
container
- directory namedirectory
- virtual pathpublic void deleteDirectory(String containerName, String directory)
removeBlob(java.lang.String, java.lang.String)
deleteDirectory
in interface BlobStore
deleteDirectory
in class BaseBlobStore
public boolean containerExists(String container)
AtmosClient.pathExists(java.lang.String)
public boolean directoryExists(String container, String directory)
AtmosClient.pathExists(java.lang.String)
directoryExists
in interface BlobStore
directoryExists
in class BaseBlobStore
container
- container where the directory residesdirectory
- virtual pathpublic boolean blobExists(String container, String key)
AtmosClient.pathExists(java.lang.String)
container
- containerkey
- file namepublic Blob getBlob(String container, String key, GetOptions options)
AtmosClient.readFile(java.lang.String, org.jclouds.http.options.GetOptions...)
container
- container where this exists.key
- fully qualified name relative to the container.options
- byte range or condition optionspublic PageSet<? extends StorageMetadata> list()
AtmosClient.listDirectories(org.jclouds.atmos.options.ListOptions...)
public PageSet<? extends StorageMetadata> list(String container, ListContainerOptions options)
AtmosClient.listDirectory(java.lang.String, org.jclouds.atmos.options.ListOptions...)
container
- what to listoptions
- size, recursion, and context of the listpublic String putBlob(String container, Blob blob)
AtmosClient.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.container
- container to place the blob.blob
- fully qualified name relative to the container.public String putBlob(String container, Blob blob, PutOptions options)
AtmosClient.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.container
- container to place the blob.blob
- fully qualified name relative to the container.options
- byte range optionspublic void removeBlob(String container, String key)
AtmosClient.deletePath(java.lang.String)
container
- container where this exists.key
- fully qualified name relative to the container.public BlobAccess getBlobAccess(String container, String key)
public void setBlobAccess(String container, String key, BlobAccess access)
public boolean createContainerInLocation(Location location, String container, CreateContainerOptions options)
options
- controls default access controlBlobStore.createContainerInLocation(Location,String)
public MultipartUpload initiateMultipartUpload(String container, BlobMetadata blobMetadata, PutOptions options)
public void abortMultipartUpload(MultipartUpload mpu)
public String completeMultipartUpload(MultipartUpload mpu, List<MultipartPart> parts)
public MultipartPart uploadMultipartPart(MultipartUpload mpu, int partNumber, Payload payload)
public List<MultipartPart> listMultipartUpload(MultipartUpload mpu)
public List<MultipartUpload> listMultipartUploads(String container)
public long getMinimumMultipartPartSize()
public long getMaximumMultipartPartSize()
public int getMaximumNumberOfParts()
public InputStream streamBlob(String container, String name)
streamBlob
in interface BlobStore
streamBlob
in class BaseBlobStore
public String copyBlob(String fromContainer, String fromName, String toContainer, String toName, CopyOptions options)
BlobStore
copyBlob
in interface BlobStore
copyBlob
in class BaseBlobStore
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.