Class AzureBlobStoreBackend

    • Constructor Detail

      • AzureBlobStoreBackend

        public AzureBlobStoreBackend()
    • Method Detail

      • setProperties

        public void setProperties​(Properties properties)
      • getBlobRequestOptions

        @NotNull
        protected @NotNull com.microsoft.azure.storage.blob.BlobRequestOptions getBlobRequestOptions()
      • write

        public void write​(DataIdentifier identifier,
                          File file)
                   throws DataStoreException
        Description copied from interface: SharedBackend
        Stores file to backend with identifier used as key. If key pre-exists, it updates the timestamp of the key.
        Parameters:
        identifier - key of the file
        file - file that would be stored in backend.
        Throws:
        DataStoreException - for any error.
      • getOrCreateReferenceKey

        public byte[] getOrCreateReferenceKey()
                                       throws DataStoreException
        Description copied from class: AbstractSharedBackend
        Returns the reference key of this backend. If one does not already exist, it is automatically created in an implementation-specific way. The default implementation simply creates a temporary random key that's valid only until the data store gets restarted. Subclasses can override and/or decorate this method to support a more persistent reference key.

        This method is called only once during the lifetime of a backend instance and the return value is cached in memory, so it's no problem if the implementation is slow.

        Overrides:
        getOrCreateReferenceKey in class AbstractSharedBackend
        Returns:
        reference key
        Throws:
        DataStoreException - if the key is not available
      • getAllIdentifiers

        public Iterator<DataIdentifier> getAllIdentifiers()
        Description copied from interface: SharedBackend
        Returns identifiers of all records that exists in backend.
        Returns:
        iterator consisting of all identifiers
      • getAllRecords

        public Iterator<DataRecord> getAllRecords()
        Description copied from interface: SharedBackend
        Returns a list of all DataRecords
        Returns:
        iterator over DataRecords
      • exists

        public boolean exists​(DataIdentifier identifier)
                       throws DataStoreException
        Description copied from interface: SharedBackend
        This method check the existence of record in backend.
        Parameters:
        identifier - identifier to be checked.
        Returns:
        true if records exists else false.
        Throws:
        DataStoreException
      • getMetadataRecord

        public DataRecord getMetadataRecord​(String name)
        Description copied from interface: SharedBackend
        Gets the metadata of the specified name.
        Parameters:
        name - the name of the record
        Returns:
        the metadata DataRecord
      • getAllMetadataRecords

        public List<DataRecord> getAllMetadataRecords​(String prefix)
        Description copied from interface: SharedBackend
        Gets all the metadata with a specified prefix.
        Parameters:
        prefix - the prefix of the records to retrieve
        Returns:
        list of all the metadata DataRecords
      • deleteMetadataRecord

        public boolean deleteMetadataRecord​(String name)
        Description copied from interface: SharedBackend
        Deletes the metadata record with the specified name
        Parameters:
        name - the name of the record
        Returns:
        boolean to indicate success of deletion
      • deleteAllMetadataRecords

        public void deleteAllMetadataRecords​(String prefix)
        Description copied from interface: SharedBackend
        Deletes all the metadata records with the specified prefix.
        Parameters:
        prefix - the prefix of the record
      • metadataRecordExists

        public boolean metadataRecordExists​(String name)
        Description copied from interface: SharedBackend
        Checks if the metadata record with the specified name exists.
        Parameters:
        name - the name of the record
        Returns:
        whether record exists