public final class ReadOnlyBlobStore extends ForwardingBlobStore
Modifier and Type | Method and Description |
---|---|
void |
abortMultipartUpload(MultipartUpload mpu) |
BlobBuilder |
blobBuilder(String name) |
void |
clearContainer(String container)
This will delete the contents of a container at its root path without deleting the container
|
void |
clearContainer(String container,
ListContainerOptions options)
Like
BlobStore.clearContainer(String) except you can use options to do things like recursive
deletes, or clear at a different path than root. |
String |
completeMultipartUpload(MultipartUpload mpu,
List<MultipartPart> parts) |
String |
copyBlob(String fromContainer,
String fromName,
String toContainer,
String toName,
CopyOptions options)
Copy blob from one container to another.
|
boolean |
createContainerInLocation(Location location,
String container)
Creates a namespace for your blobs
A container is a namespace for your objects.
|
boolean |
createContainerInLocation(Location location,
String container,
CreateContainerOptions createContainerOptions) |
void |
createDirectory(String container,
String directory)
Creates a folder or a directory marker depending on the service
|
void |
deleteContainer(String container)
This will delete everything inside a container recursively.
|
boolean |
deleteContainerIfEmpty(String container)
Deletes a container if it is empty.
|
void |
deleteDirectory(String container,
String directory)
Deletes a folder or a directory marker depending on the service
|
void |
downloadBlob(String container,
String name,
File destination) |
void |
downloadBlob(String container,
String name,
File destination,
ExecutorService executor) |
BlobStoreContext |
getContext() |
MultipartUpload |
initiateMultipartUpload(String container,
BlobMetadata blobMetadata,
PutOptions options) |
List<MultipartPart> |
listMultipartUpload(MultipartUpload mpu) |
List<MultipartUpload> |
listMultipartUploads(String container) |
static BlobStore |
newReadOnlyBlobStore(BlobStore blobStore) |
String |
putBlob(String containerName,
Blob blob)
Adds a
Blob representing the data at location container/blob.metadata.name |
String |
putBlob(String containerName,
Blob blob,
PutOptions putOptions)
Adds a
Blob representing the data at location container/blob.metadata.name
options using multipart strategies. |
void |
removeBlob(String container,
String name)
Deletes a
Blob representing the data at location container/name |
void |
removeBlobs(String container,
Iterable<String> iterable)
Deletes multiple
Blob s representing the data at location container/name |
void |
setBlobAccess(String container,
String name,
BlobAccess access) |
void |
setContainerAccess(String container,
ContainerAccess containerAccess) |
InputStream |
streamBlob(String container,
String name) |
InputStream |
streamBlob(String container,
String name,
ExecutorService executor) |
MultipartPart |
uploadMultipartPart(MultipartUpload mpu,
int partNumber,
Payload payload) |
blobExists, blobMetadata, containerExists, countBlobs, countBlobs, delegate, directoryExists, getBlob, getBlob, getBlobAccess, getContainerAccess, getMaximumMultipartPartSize, getMaximumNumberOfParts, getMinimumMultipartPartSize, list, list, list, listAssignableLocations
public BlobStoreContext getContext()
getContext
in interface BlobStore
getContext
in class ForwardingBlobStore
public BlobBuilder blobBuilder(String name)
blobBuilder
in interface BlobStore
blobBuilder
in class ForwardingBlobStore
Blob
spublic boolean createContainerInLocation(Location location, String container)
BlobStore
createContainerInLocation
in interface BlobStore
createContainerInLocation
in class ForwardingBlobStore
location
- some blobstores allow you to specify a location, such as US-EAST, for where this
container will exist. null will choose a default locationcontainer
- namespace. Typically constrained to lowercase alpha-numeric and hyphens.public boolean createContainerInLocation(Location location, String container, CreateContainerOptions createContainerOptions)
createContainerInLocation
in interface BlobStore
createContainerInLocation
in class ForwardingBlobStore
createContainerOptions
- controls default access controlBlobStore.createContainerInLocation(Location,String)
public void setContainerAccess(String container, ContainerAccess containerAccess)
setContainerAccess
in interface BlobStore
setContainerAccess
in class ForwardingBlobStore
public void clearContainer(String container)
BlobStore
clearContainer
in interface BlobStore
clearContainer
in class ForwardingBlobStore
container
- what to clearpublic void clearContainer(String container, ListContainerOptions options)
BlobStore
BlobStore.clearContainer(String)
except you can use options to do things like recursive
deletes, or clear at a different path than root.clearContainer
in interface BlobStore
clearContainer
in class ForwardingBlobStore
container
- what to clearoptions
- recursion and path to clearpublic void deleteContainer(String container)
BlobStore
deleteContainer
in interface BlobStore
deleteContainer
in class ForwardingBlobStore
container
- what to deletepublic boolean deleteContainerIfEmpty(String container)
BlobStore
deleteContainerIfEmpty
in interface BlobStore
deleteContainerIfEmpty
in class ForwardingBlobStore
container
- name of the container to deletepublic void createDirectory(String container, String directory)
BlobStore
createDirectory
in interface BlobStore
createDirectory
in class ForwardingBlobStore
container
- container to create the directory indirectory
- full path to the directorypublic void deleteDirectory(String container, String directory)
BlobStore
deleteDirectory
in interface BlobStore
deleteDirectory
in class ForwardingBlobStore
public String putBlob(String containerName, Blob blob)
BlobStore
Blob
representing the data at location container/blob.metadata.name
putBlob
in interface BlobStore
putBlob
in class ForwardingBlobStore
containerName
- container to place the blob.blob
- fully qualified name relative to the container.public String putBlob(String containerName, Blob blob, PutOptions putOptions)
BlobStore
Blob
representing the data at location container/blob.metadata.name
options using multipart strategies.putBlob
in interface BlobStore
putBlob
in class ForwardingBlobStore
containerName
- container to place the blob.blob
- fully qualified name relative to the container.putOptions
- byte range optionspublic String copyBlob(String fromContainer, String fromName, String toContainer, String toName, CopyOptions options)
BlobStore
copyBlob
in interface BlobStore
copyBlob
in class ForwardingBlobStore
public void removeBlob(String container, String name)
BlobStore
Blob
representing the data at location container/name
removeBlob
in interface BlobStore
removeBlob
in class ForwardingBlobStore
container
- container where this exists.name
- fully qualified name relative to the container.public void removeBlobs(String container, Iterable<String> iterable)
BlobStore
Blob
s representing the data at location container/name
removeBlobs
in interface BlobStore
removeBlobs
in class ForwardingBlobStore
container
- container where this exists.iterable
- fully qualified names relative to the container.public void setBlobAccess(String container, String name, BlobAccess access)
setBlobAccess
in interface BlobStore
setBlobAccess
in class ForwardingBlobStore
public MultipartUpload initiateMultipartUpload(String container, BlobMetadata blobMetadata, PutOptions options)
initiateMultipartUpload
in interface BlobStore
initiateMultipartUpload
in class ForwardingBlobStore
public void abortMultipartUpload(MultipartUpload mpu)
abortMultipartUpload
in interface BlobStore
abortMultipartUpload
in class ForwardingBlobStore
public String completeMultipartUpload(MultipartUpload mpu, List<MultipartPart> parts)
completeMultipartUpload
in interface BlobStore
completeMultipartUpload
in class ForwardingBlobStore
public MultipartPart uploadMultipartPart(MultipartUpload mpu, int partNumber, Payload payload)
uploadMultipartPart
in interface BlobStore
uploadMultipartPart
in class ForwardingBlobStore
public List<MultipartPart> listMultipartUpload(MultipartUpload mpu)
listMultipartUpload
in interface BlobStore
listMultipartUpload
in class ForwardingBlobStore
public List<MultipartUpload> listMultipartUploads(String container)
listMultipartUploads
in interface BlobStore
listMultipartUploads
in class ForwardingBlobStore
public void downloadBlob(String container, String name, File destination)
downloadBlob
in interface BlobStore
downloadBlob
in class ForwardingBlobStore
public void downloadBlob(String container, String name, File destination, ExecutorService executor)
downloadBlob
in interface BlobStore
downloadBlob
in class ForwardingBlobStore
public InputStream streamBlob(String container, String name)
streamBlob
in interface BlobStore
streamBlob
in class ForwardingBlobStore
public InputStream streamBlob(String container, String name, ExecutorService executor)
streamBlob
in interface BlobStore
streamBlob
in class ForwardingBlobStore
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.