Package org.jclouds.glacier.blobstore
Class GlacierBlobStore
java.lang.Object
org.jclouds.blobstore.internal.BaseBlobStore
org.jclouds.glacier.blobstore.GlacierBlobStore
- All Implemented Interfaces:
BlobStore
-
Field Summary
FieldsFields inherited from class org.jclouds.blobstore.internal.BaseBlobStore
blobUtils, context, defaultLocation, locations, slicer -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanblobExists(String container, String key) Checks if the blob exists in the container.blobMetadata(String container, String key) Retrieves the blob metadata.completeMultipartUpload(MultipartUpload mpu, List<MultipartPart> parts) booleancontainerExists(String container) Checks if the container exists.booleancreateContainerInLocation(Location location, String container) Creates a container.booleancreateContainerInLocation(Location location, String container, CreateContainerOptions options) Creates a container.protected booleandeleteAndVerifyContainerGone(String container) Delete a container if it is empty.voiddeleteContainer(String container) Deletes the container and all its blobs.protected voiddeletePathAndEnsureGone(String container) Retrieves the blob using default options This operation will take several hours.getBlob(String container, String key, GetOptions getOptions) Retrieves the blob This operation will take several hours.getBlobAccess(String container, String name) getContainerAccess(String container) longintlonginitiateMultipartUpload(String container, BlobMetadata blobMetadata, PutOptions options) PageSet<? extends StorageMetadata> list()Lists the containers.PageSet<? extends StorageMetadata> list(String container, ListContainerOptions listContainerOptions) Lists the blobs in the container.listMultipartUploads(String container) Stores a blob in a container.putBlob(String container, Blob blob, PutOptions options) Stores the blob in a container.voidremoveBlob(String container, String key) Deletes the blob.voidsetBlobAccess(String container, String name, BlobAccess access) voidsetContainerAccess(String container, ContainerAccess access) uploadMultipartPart(MultipartUpload mpu, int partNumber, Payload payload) Methods inherited from class org.jclouds.blobstore.internal.BaseBlobStore
blobBuilder, clearContainer, clearContainer, copyBlob, countBlobs, countBlobs, createDirectory, deleteContainerIfEmpty, deleteDirectory, directoryExists, downloadBlob, downloadBlob, getContext, list, listAssignableLocations, putMultipartBlob, putMultipartBlob, removeBlobs, streamBlob, streamBlob
-
Field Details
-
DEFAULT_INVENTORY_UPDATE_TIME
public static final long DEFAULT_INVENTORY_UPDATE_TIME
-
-
Method Details
-
deleteContainer
Deletes the container and all its blobs. Inventories will be retrieved until the container is gone. Since inventories need 24 hours to be updated this operation may take days.- Specified by:
deleteContainerin interfaceBlobStore- Overrides:
deleteContainerin classBaseBlobStore- Parameters:
container- container name- See Also:
-
deletePathAndEnsureGone
- Overrides:
deletePathAndEnsureGonein classBaseBlobStore
-
deleteAndVerifyContainerGone
Description copied from class:BaseBlobStoreDelete a container if it is empty.- Specified by:
deleteAndVerifyContainerGonein classBaseBlobStore- Parameters:
container- what to delete- Returns:
- whether container was deleted
-
list
Lists the containers.- Returns:
- a PageSet of StorageMetadata
-
containerExists
Checks if the container exists. This implementation invokesGlacierClient.describeVault(String).- Parameters:
container- container name- Returns:
- true if the vault exists, false otherwise
-
createContainerInLocation
Creates a container. Location is currently ignored.- Parameters:
location- currently ignoredcontainer- container name- Returns:
- true if the container was created, false otherwise
-
createContainerInLocation
public boolean createContainerInLocation(@Nullable Location location, String container, CreateContainerOptions options) Creates a container. Location and options are currently ignored.- Parameters:
location- currently ignoredcontainer- container nameoptions- currently ignored- Returns:
- true if the container was created, false otherwise
- See Also:
-
getContainerAccess
-
setContainerAccess
-
list
public PageSet<? extends StorageMetadata> list(String container, ListContainerOptions listContainerOptions) Lists the blobs in the container. An inventory will be retrieved to obtain the list. Note that this will take hours and the result may be inaccurate (Inventories are updated every 24 hours).- Parameters:
container- container namelistContainerOptions- list options- Returns:
- the blob list
- See Also:
-
blobExists
Checks if the blob exists in the container. An inventory will be retrieved to obtain the blob list and the method will iterate through it. This operation will take several hours and the result may be inaccurate (Inventories are updated every 24 hours).- Parameters:
container- container namekey- blob key- Returns:
- true if the blob exists, false otherwise
- See Also:
-
putBlob
Stores a blob in a container. The blob name will be ignored, since it's not supported by Glacier.- Parameters:
container- container nameblob- blob to upload- Returns:
- the blob name
-
putBlob
Stores the blob in a container.- Parameters:
container- container nameblob- blob to uploadoptions- upload options.- Returns:
- the blob name
-
blobMetadata
Retrieves the blob metadata. An inventory will be retrieved to obtain the blob list and the method will iterate through it. This operation will take several hours and the result may be inaccurate (Inventories are updated every 24 hours).- Parameters:
container- container namekey- blob name- Returns:
- null if the blob doesn't exist, the blob metadata otherwise
- See Also:
-
getBlob
Retrieves the blob This operation will take several hours.- Parameters:
container- container namekey- blob namegetOptions- byte range or condition options- Returns:
- The blob to retrieve, or null if the blob doesn't exist or the archive retrieval fails
-
getBlob
Retrieves the blob using default options This operation will take several hours.- Specified by:
getBlobin interfaceBlobStore- Overrides:
getBlobin classBaseBlobStore- Parameters:
container- container namekey- blob name- Returns:
- The blob to retrieve, or null if the blob doesn't exist or the archive retrieval fails
-
removeBlob
Deletes the blob.- Parameters:
container- container namekey- blob name
-
getBlobAccess
-
setBlobAccess
-
initiateMultipartUpload
public MultipartUpload initiateMultipartUpload(String container, BlobMetadata blobMetadata, PutOptions options) -
abortMultipartUpload
-
completeMultipartUpload
-
uploadMultipartPart
-
listMultipartUpload
-
listMultipartUploads
-
getMinimumMultipartPartSize
public long getMinimumMultipartPartSize() -
getMaximumMultipartPartSize
public long getMaximumMultipartPartSize() -
getMaximumNumberOfParts
public int getMaximumNumberOfParts()
-