public interface BlobStore
Modifier and Type | Method and Description |
---|---|
void |
abortMultipartUpload(MultipartUpload mpu) |
BlobBuilder |
blobBuilder(String name) |
boolean |
blobExists(String container,
String name)
Determines if a blob exists
|
BlobMetadata |
blobMetadata(String container,
String name)
Retrieves the metadata of a
Blob at location container/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
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) |
boolean |
containerExists(String container)
determines if a service-level container exists
|
String |
copyBlob(String fromContainer,
String fromName,
String toContainer,
String toName,
CopyOptions options)
Copy blob from one container to another.
|
long |
countBlobs(String container) |
long |
countBlobs(String container,
ListContainerOptions options) |
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 options) |
void |
createDirectory(String container,
String directory)
Deprecated.
use prefix and delimiter instead
|
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 containerName,
String name)
Deprecated.
use prefix and delimiter instead
|
boolean |
directoryExists(String container,
String directory)
Deprecated.
use prefix and delimiter instead
|
void |
downloadBlob(String container,
String name,
File destination) |
void |
downloadBlob(String container,
String name,
File destination,
ExecutorService executor) |
Blob |
getBlob(String container,
String name)
Retrieves a
Blob representing the data at location container/name |
Blob |
getBlob(String container,
String name,
GetOptions options)
Retrieves a
Blob representing the data at location container/name |
BlobAccess |
getBlobAccess(String container,
String name) |
ContainerAccess |
getContainerAccess(String container) |
BlobStoreContext |
getContext() |
long |
getMaximumMultipartPartSize() |
int |
getMaximumNumberOfParts() |
long |
getMinimumMultipartPartSize() |
MultipartUpload |
initiateMultipartUpload(String container,
BlobMetadata blob,
PutOptions options) |
PageSet<? extends StorageMetadata> |
list()
Lists all root-level resources available to the identity.
|
PageSet<? extends StorageMetadata> |
list(String container)
Lists all resources in a container non-recursive.
|
PageSet<? extends StorageMetadata> |
list(String container,
ListContainerOptions options)
Like
list(String) except you can control the size, recursion, and context of the list
using options |
Set<? extends Location> |
listAssignableLocations()
The get locations command returns all the valid locations for containers.
|
List<MultipartPart> |
listMultipartUpload(MultipartUpload mpu) |
List<MultipartUpload> |
listMultipartUploads(String container) |
String |
putBlob(String container,
Blob blob)
Adds a
Blob representing the data at location container/blob.metadata.name |
String |
putBlob(String container,
Blob blob,
PutOptions options)
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> names)
Deletes multiple
Blob s representing the data at location container/name |
void |
setBlobAccess(String container,
String name,
BlobAccess access) |
void |
setContainerAccess(String container,
ContainerAccess access) |
InputStream |
streamBlob(String container,
String name) |
InputStream |
streamBlob(String container,
String name,
ExecutorService executor) |
MultipartPart |
uploadMultipartPart(MultipartUpload mpu,
int partNumber,
Payload payload) |
BlobStoreContext getContext()
BlobBuilder blobBuilder(String name)
Blob
sSet<? extends Location> listAssignableLocations()
PageSet<? extends StorageMetadata> list()
boolean containerExists(String container)
boolean createContainerInLocation(@Nullable Location location, String container)
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.boolean createContainerInLocation(@Nullable Location location, String container, CreateContainerOptions options)
options
- controls default access controlcreateContainerInLocation(Location,String)
@Beta ContainerAccess getContainerAccess(String container)
@Beta void setContainerAccess(String container, ContainerAccess access)
PageSet<? extends StorageMetadata> list(String container)
container
- what to listPageSet<? extends StorageMetadata> list(String container, ListContainerOptions options)
list(String)
except you can control the size, recursion, and context of the list
using options
container
- what to listoptions
- size, recursion, and context of the listvoid clearContainer(String container)
container
- what to clearvoid clearContainer(String container, ListContainerOptions options)
clearContainer(String)
except you can use options to do things like recursive
deletes, or clear at a different path than root.container
- what to clearoptions
- recursion and path to clearvoid deleteContainer(String container)
container
- what to deletecontainer
- name of the container to deleteboolean deleteContainerIfEmpty(String container)
container
- name of the container to delete@Deprecated boolean directoryExists(String container, String directory)
container
- container where the directory residesdirectory
- full path to the directory@Deprecated void createDirectory(String container, String directory)
container
- container to create the directory indirectory
- full path to the directory@Deprecated void deleteDirectory(String containerName, String name)
container
- container to delete the directory fromdirectory
- full path to the directory to deleteboolean blobExists(String container, String name)
container
- container where the blob residesdirectory
- full path to the blobString putBlob(String container, Blob blob)
Blob
representing the data at location container/blob.metadata.name
container
- container to place the blob.blob
- fully qualified name relative to the container.options
- byte range or condition optionsContainerNotFoundException
- if the container doesn't existString putBlob(String container, Blob blob, PutOptions options)
Blob
representing the data at location container/blob.metadata.name
options using multipart strategies.container
- container to place the blob.blob
- fully qualified name relative to the container.options
- byte range optionsContainerNotFoundException
- if the container doesn't exist@Beta String copyBlob(String fromContainer, String fromName, String toContainer, String toName, CopyOptions options)
ContainerNotFoundException
- if either container does not exist@Nullable BlobMetadata blobMetadata(String container, String name)
Blob
at location container/name
container
- container where this exists.name
- fully qualified name relative to the container.ContainerNotFoundException
- if the container doesn't exist@Nullable Blob getBlob(String container, String name)
Blob
representing the data at location container/name
container
- container where this exists.name
- fully qualified name relative to the container.ContainerNotFoundException
- if the container doesn't exist@Nullable Blob getBlob(String container, String name, GetOptions options)
Blob
representing the data at location container/name
container
- container where this exists.name
- fully qualified name relative to the container.options
- byte range or condition optionsContainerNotFoundException
- if the container doesn't existvoid removeBlob(String container, String name)
Blob
representing the data at location container/name
container
- container where this exists.name
- fully qualified name relative to the container.ContainerNotFoundException
- if the container doesn't existvoid removeBlobs(String container, Iterable<String> names)
Blob
s representing the data at location container/name
container
- container where this exists.names
- fully qualified names relative to the container.ContainerNotFoundException
- if the container doesn't exist@Beta BlobAccess getBlobAccess(String container, String name)
@Beta void setBlobAccess(String container, String name, BlobAccess access)
long countBlobs(String container)
long countBlobs(String container, ListContainerOptions options)
@Beta MultipartUpload initiateMultipartUpload(String container, BlobMetadata blob, PutOptions options)
@Beta void abortMultipartUpload(MultipartUpload mpu)
@Beta String completeMultipartUpload(MultipartUpload mpu, List<MultipartPart> parts)
@Beta MultipartPart uploadMultipartPart(MultipartUpload mpu, int partNumber, Payload payload)
@Beta List<MultipartPart> listMultipartUpload(MultipartUpload mpu)
@Beta List<MultipartUpload> listMultipartUploads(String container)
@Beta long getMinimumMultipartPartSize()
@Beta long getMaximumMultipartPartSize()
@Beta int getMaximumNumberOfParts()
@Beta void downloadBlob(String container, String name, File destination, ExecutorService executor)
@Beta InputStream streamBlob(String container, String name)
@Beta InputStream streamBlob(String container, String name, ExecutorService executor)
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.