Class GlacierBlobStore

java.lang.Object
org.jclouds.blobstore.internal.BaseBlobStore
org.jclouds.glacier.blobstore.GlacierBlobStore
All Implemented Interfaces:
BlobStore

public class GlacierBlobStore extends BaseBlobStore
  • Field Details

    • DEFAULT_INVENTORY_UPDATE_TIME

      public static final long DEFAULT_INVENTORY_UPDATE_TIME
  • Method Details

    • deleteContainer

      public void deleteContainer(String container)
      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:
      deleteContainer in interface BlobStore
      Overrides:
      deleteContainer in class BaseBlobStore
      Parameters:
      container - container name
      See Also:
    • deletePathAndEnsureGone

      Overrides:
      deletePathAndEnsureGone in class BaseBlobStore
    • deleteAndVerifyContainerGone

      protected boolean deleteAndVerifyContainerGone(String container)
      Description copied from class: BaseBlobStore
      Delete a container if it is empty.
      Specified by:
      deleteAndVerifyContainerGone in class BaseBlobStore
      Parameters:
      container - what to delete
      Returns:
      whether container was deleted
    • list

      public PageSet<? extends StorageMetadata> list()
      Lists the containers.
      Returns:
      a PageSet of StorageMetadata
    • containerExists

      public boolean containerExists(String container)
      Checks if the container exists. This implementation invokes GlacierClient.describeVault(String).
      Parameters:
      container - container name
      Returns:
      true if the vault exists, false otherwise
    • createContainerInLocation

      public boolean createContainerInLocation(@Nullable Location location, String container)
      Creates a container. Location is currently ignored.
      Parameters:
      location - currently ignored
      container - 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 ignored
      container - container name
      options - currently ignored
      Returns:
      true if the container was created, false otherwise
      See Also:
    • getContainerAccess

      public ContainerAccess getContainerAccess(String container)
    • setContainerAccess

      public void setContainerAccess(String container, ContainerAccess access)
    • 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 name
      listContainerOptions - 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 name
      key - blob key
      Returns:
      true if the blob exists, false otherwise
      See Also:
    • putBlob

      public String putBlob(String container, Blob blob)
      Stores a blob in a container. The blob name will be ignored, since it's not supported by Glacier.
      Parameters:
      container - container name
      blob - blob to upload
      Returns:
      the blob name
    • putBlob

      public String putBlob(String container, Blob blob, PutOptions options)
      Stores the blob in a container.
      Parameters:
      container - container name
      blob - blob to upload
      options - upload options.
      Returns:
      the blob name
    • blobMetadata

      public BlobMetadata blobMetadata(String container, String key)
      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 name
      key - blob name
      Returns:
      null if the blob doesn't exist, the blob metadata otherwise
      See Also:
    • getBlob

      public Blob getBlob(String container, String key, GetOptions getOptions)
      Retrieves the blob This operation will take several hours.
      Parameters:
      container - container name
      key - blob name
      getOptions - byte range or condition options
      Returns:
      The blob to retrieve, or null if the blob doesn't exist or the archive retrieval fails
    • getBlob

      public Blob getBlob(String container, String key)
      Retrieves the blob using default options This operation will take several hours.
      Specified by:
      getBlob in interface BlobStore
      Overrides:
      getBlob in class BaseBlobStore
      Parameters:
      container - container name
      key - blob name
      Returns:
      The blob to retrieve, or null if the blob doesn't exist or the archive retrieval fails
    • removeBlob

      public void removeBlob(String container, String key)
      Deletes the blob.
      Parameters:
      container - container name
      key - blob name
    • getBlobAccess

      public BlobAccess getBlobAccess(String container, String name)
    • setBlobAccess

      public void setBlobAccess(String container, String name, BlobAccess access)
    • initiateMultipartUpload

      public MultipartUpload initiateMultipartUpload(String container, BlobMetadata blobMetadata, PutOptions options)
    • abortMultipartUpload

      public void abortMultipartUpload(MultipartUpload mpu)
    • completeMultipartUpload

      public String completeMultipartUpload(MultipartUpload mpu, List<MultipartPart> parts)
    • uploadMultipartPart

      public MultipartPart uploadMultipartPart(MultipartUpload mpu, int partNumber, Payload payload)
    • listMultipartUpload

      public List<MultipartPart> listMultipartUpload(MultipartUpload mpu)
    • listMultipartUploads

      public List<MultipartUpload> listMultipartUploads(String container)
    • getMinimumMultipartPartSize

      public long getMinimumMultipartPartSize()
    • getMaximumMultipartPartSize

      public long getMaximumMultipartPartSize()
    • getMaximumNumberOfParts

      public int getMaximumNumberOfParts()