public abstract class ForwardingBlobStore extends com.google.common.collect.ForwardingObject implements BlobStore
Constructor and Description |
---|
ForwardingBlobStore(BlobStore 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
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) |
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 createContainerOptions) |
void |
createDirectory(String container,
String directory)
Creates a folder or a directory marker depending on the service
|
protected BlobStore |
delegate() |
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
|
boolean |
directoryExists(String container,
String directory)
Determines if a directory exists
|
void |
downloadBlob(String container,
String name,
File destination) |
void |
downloadBlob(String container,
String name,
File destination,
ExecutorService executor) |
Blob |
getBlob(String containerName,
String blobName)
Retrieves a
Blob representing the data at location container/name |
Blob |
getBlob(String containerName,
String blobName,
GetOptions getOptions)
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 blobMetadata,
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
BlobStore.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 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) |
public ForwardingBlobStore(BlobStore blobStore)
protected BlobStore delegate()
delegate
in class com.google.common.collect.ForwardingObject
public BlobStoreContext getContext()
getContext
in interface BlobStore
public BlobBuilder blobBuilder(String name)
blobBuilder
in interface BlobStore
Blob
spublic Set<? extends Location> listAssignableLocations()
BlobStore
listAssignableLocations
in interface BlobStore
public PageSet<? extends StorageMetadata> list()
BlobStore
public boolean containerExists(String container)
BlobStore
containerExists
in interface BlobStore
public boolean createContainerInLocation(Location location, String container)
BlobStore
createContainerInLocation
in interface BlobStore
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
createContainerOptions
- controls default access controlBlobStore.createContainerInLocation(Location,String)
public ContainerAccess getContainerAccess(String container)
getContainerAccess
in interface BlobStore
public void setContainerAccess(String container, ContainerAccess containerAccess)
setContainerAccess
in interface BlobStore
public PageSet<? extends StorageMetadata> list(String container)
BlobStore
public PageSet<? extends StorageMetadata> list(String container, ListContainerOptions options)
BlobStore
BlobStore.list(String)
except you can control the size, recursion, and context of the list
using options
public void clearContainer(String container)
BlobStore
clearContainer
in interface BlobStore
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
container
- what to clearoptions
- recursion and path to clearpublic void deleteContainer(String container)
BlobStore
deleteContainer
in interface BlobStore
container
- what to deletepublic boolean deleteContainerIfEmpty(String container)
BlobStore
deleteContainerIfEmpty
in interface BlobStore
container
- name of the container to deletepublic boolean directoryExists(String container, String directory)
BlobStore
directoryExists
in interface BlobStore
container
- container where the directory residesdirectory
- full path to the directorypublic void createDirectory(String container, String directory)
BlobStore
createDirectory
in interface BlobStore
container
- container to create the directory indirectory
- full path to the directorypublic void deleteDirectory(String container, String directory)
BlobStore
deleteDirectory
in interface BlobStore
public boolean blobExists(String container, String name)
BlobStore
blobExists
in interface BlobStore
container
- container where the blob residespublic String putBlob(String containerName, Blob blob)
BlobStore
Blob
representing the data at location container/blob.metadata.name
public String putBlob(String containerName, Blob blob, PutOptions putOptions)
BlobStore
Blob
representing the data at location container/blob.metadata.name
options using multipart strategies.public String copyBlob(String fromContainer, String fromName, String toContainer, String toName, CopyOptions options)
BlobStore
public BlobMetadata blobMetadata(String container, String name)
BlobStore
Blob
at location container/name
blobMetadata
in interface BlobStore
container
- container where this exists.name
- fully qualified name relative to the container.public Blob getBlob(String containerName, String blobName)
BlobStore
Blob
representing the data at location container/name
public Blob getBlob(String containerName, String blobName, GetOptions getOptions)
BlobStore
Blob
representing the data at location container/name
public void removeBlob(String container, String name)
BlobStore
Blob
representing the data at location container/name
removeBlob
in interface BlobStore
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
container
- container where this exists.iterable
- fully qualified names relative to the container.public BlobAccess getBlobAccess(String container, String name)
getBlobAccess
in interface BlobStore
public void setBlobAccess(String container, String name, BlobAccess access)
setBlobAccess
in interface BlobStore
public long countBlobs(String container)
countBlobs
in interface BlobStore
public long countBlobs(String container, ListContainerOptions options)
countBlobs
in interface BlobStore
public MultipartUpload initiateMultipartUpload(String container, BlobMetadata blobMetadata, PutOptions options)
initiateMultipartUpload
in interface BlobStore
public void abortMultipartUpload(MultipartUpload mpu)
abortMultipartUpload
in interface BlobStore
public String completeMultipartUpload(MultipartUpload mpu, List<MultipartPart> parts)
completeMultipartUpload
in interface BlobStore
public MultipartPart uploadMultipartPart(MultipartUpload mpu, int partNumber, Payload payload)
uploadMultipartPart
in interface BlobStore
public List<MultipartPart> listMultipartUpload(MultipartUpload mpu)
listMultipartUpload
in interface BlobStore
public List<MultipartUpload> listMultipartUploads(String container)
listMultipartUploads
in interface BlobStore
public long getMinimumMultipartPartSize()
getMinimumMultipartPartSize
in interface BlobStore
public long getMaximumMultipartPartSize()
getMaximumMultipartPartSize
in interface BlobStore
public int getMaximumNumberOfParts()
getMaximumNumberOfParts
in interface BlobStore
public void downloadBlob(String container, String name, File destination)
downloadBlob
in interface BlobStore
public void downloadBlob(String container, String name, File destination, ExecutorService executor)
downloadBlob
in interface BlobStore
public InputStream streamBlob(String container, String name)
streamBlob
in interface BlobStore
public InputStream streamBlob(String container, String name, ExecutorService executor)
streamBlob
in interface BlobStore
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.