public final class GoogleCloudStorageBlobStore extends BaseBlobStore
blobUtils, context, defaultLocation, locations, slicer
Modifier and Type | Method and Description |
---|---|
void |
abortMultipartUpload(MultipartUpload mpu) |
boolean |
blobExists(String container,
String name)
Checks whether an accessible object is available.
|
BlobMetadata |
blobMetadata(String container,
String name)
Retrieves the metadata of a
Blob at location container/name |
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.
|
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) |
protected boolean |
deleteAndVerifyContainerGone(String container)
Delete a container if it is empty.
|
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) |
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)
Returns list of of all the objects
|
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 |
List<MultipartPart> |
listMultipartUpload(MultipartUpload mpu) |
List<MultipartUpload> |
listMultipartUploads(String container) |
String |
putBlob(String container,
Blob blob)
This supports multipart/related upload which has exactly 2 parts, media-part and metadata-part
|
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 |
setBlobAccess(String container,
String name,
BlobAccess access) |
void |
setContainerAccess(String container,
ContainerAccess access) |
MultipartPart |
uploadMultipartPart(MultipartUpload mpu,
int partNumber,
Payload payload) |
blobBuilder, clearContainer, clearContainer, countBlobs, countBlobs, createDirectory, deleteContainer, deleteContainerIfEmpty, deleteDirectory, deletePathAndEnsureGone, directoryExists, downloadBlob, downloadBlob, getBlob, getContext, listAssignableLocations, putMultipartBlob, putMultipartBlob, removeBlobs, streamBlob, streamBlob
public PageSet<? extends StorageMetadata> list()
BlobStore
public boolean containerExists(String container)
BlobStore
public boolean createContainerInLocation(Location location, String container)
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 options)
options
- controls default access controlBlobStore.createContainerInLocation(Location,String)
public ContainerAccess getContainerAccess(String container)
public void setContainerAccess(String container, ContainerAccess access)
public PageSet<? extends StorageMetadata> list(String container)
list
in interface BlobStore
list
in class BaseBlobStore
container
- container namepublic 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
container
- what to listoptions
- size, recursion, and context of the listpublic boolean blobExists(String container, String name)
container
- container where the blob residespublic String putBlob(String container, Blob blob)
container
- container to place the blob.blob
- fully qualified name relative to the container.public String putBlob(String container, Blob blob, PutOptions options)
BlobStore
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 optionspublic BlobMetadata blobMetadata(String container, String name)
BlobStore
Blob
at location container/name
container
- container where this exists.name
- fully qualified name relative to the container.public Blob getBlob(String container, String name, GetOptions options)
BlobStore
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 optionspublic void removeBlob(String container, String name)
BlobStore
Blob
representing the data at location container/name
container
- container where this exists.name
- fully qualified name 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)
BaseBlobStore
deleteAndVerifyContainerGone
in class BaseBlobStore
container
- what to deletepublic String copyBlob(String fromContainer, String fromName, String toContainer, String toName, CopyOptions options)
BlobStore
copyBlob
in interface BlobStore
copyBlob
in class BaseBlobStore
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()
Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.