Class CloudBlobStore

    • Constructor Detail

      • CloudBlobStore

        public CloudBlobStore()
    • Method Detail

      • getCloudContainer

        protected String getCloudContainer()
      • setCloudContainer

        public void setCloudContainer​(String cloudContainer)
      • getAccessKey

        public String getAccessKey()
      • setAccessKey

        public void setAccessKey​(String accessKey)
      • getSecretKey

        public String getSecretKey()
      • setSecretKey

        public void setSecretKey​(String secretKey)
      • getCloudProvider

        public String getCloudProvider()
      • setCloudProvider

        public void setCloudProvider​(String cloudProvider)
      • init

        public void init()
                  throws Exception
        Instantiates a connection to the cloud blob store.
        Throws:
        Exception - if an error occurs
      • storeBlock

        protected void storeBlock​(byte[] digest,
                                  int level,
                                  byte[] data)
                           throws IOException
        Uploads the block to the cloud service.
        Specified by:
        storeBlock in class AbstractBlobStore
        Parameters:
        digest - the content hash (32 bytes)
        level - the indirection level (0 is for user data, 1 is a list of digests that point to user data, 2 is a list of digests that point to digests, and so on). This parameter is for informational use only, and it is not required to store it unless that's easy to achieve
        data - the data to be stored (the number of bytes is at most the block size)
        Throws:
        IOException
      • deleteBucket

        public void deleteBucket()
        Delete the cloud container and all its contents.
      • getAllChunkIds

        public Iterator<String> getAllChunkIds​(long maxLastModifiedTime)
                                        throws Exception
        Description copied from interface: GarbageCollectableBlobStore
        Gets all the identifiers.
        Parameters:
        maxLastModifiedTime - the max last modified time to consider for retrieval, with the special value '0' meaning no filtering by time
        Returns:
        the identifiers
        Throws:
        Exception - the exception
      • countDeleteChunks

        public long countDeleteChunks​(List<String> chunkIds,
                                      long maxLastModifiedTime)
                               throws Exception
        Description copied from interface: GarbageCollectableBlobStore
        Deletes the blobs with the given ids.
        Parameters:
        chunkIds - the chunk ids
        maxLastModifiedTime - the max last modified time to consider for retrieval, with the special value '0' meaning no filtering by time
        Returns:
        long the count of successful deletions
        Throws:
        Exception - the exception