Class BaseBlobStore

    • Field Detail

      • blobUtils

        protected final BlobUtils blobUtils
      • defaultLocation

        protected final com.google.common.base.Supplier<Location> defaultLocation
      • locations

        protected final com.google.common.base.Supplier<Set<? extends Location>> locations
    • Method Detail

      • directoryExists

        public boolean directoryExists​(String containerName,
                                       String directory)
        This implementation invokes BlobUtilsImpl#directoryExists
        Specified by:
        directoryExists in interface BlobStore
        Parameters:
        container - container name
        directory - virtual path
      • createDirectory

        public void createDirectory​(String containerName,
                                    String directory)
        This implementation invokes BlobUtilsImpl#createDirectory
        Specified by:
        createDirectory in interface BlobStore
        Parameters:
        container - container name
        directory - virtual path
      • removeBlobs

        public void removeBlobs​(String container,
                                Iterable<String> names)
        Description copied from interface: BlobStore
        Deletes multiple Blobs representing the data at location container/name
        Specified by:
        removeBlobs in interface BlobStore
        Parameters:
        container - container where this exists.
        names - fully qualified names relative to the container.
      • countBlobs

        public long countBlobs​(String containerName,
                               ListContainerOptions options)
        This implementation invokes BlobUtilsImpl#countBlobs
        Specified by:
        countBlobs in interface BlobStore
        Parameters:
        container - container name
        Returns:
        a count of all blobs that are in a listing constrained by the options specified, excluding directory markers
      • clearContainer

        public void clearContainer​(String containerName,
                                   ListContainerOptions options)
        This implementation invokes BlobUtilsImpl#clearContainer
        Specified by:
        clearContainer in interface BlobStore
        Parameters:
        container - container name
      • deleteDirectory

        public void deleteDirectory​(String containerName,
                                    String directory)
        This implementation invokes BlobUtilsImpl#deleteDirectory.
        Specified by:
        deleteDirectory in interface BlobStore
        Parameters:
        container - container name
      • deleteContainer

        public void deleteContainer​(String container)
        This implementation invokes #deleteAndEnsurePathGone
        Specified by:
        deleteContainer in interface BlobStore
        Parameters:
        container - bucket name
      • deleteContainerIfEmpty

        public boolean deleteContainerIfEmpty​(String container)
        Description copied from interface: BlobStore
        Deletes a container if it is empty.
        Specified by:
        deleteContainerIfEmpty in interface BlobStore
        Parameters:
        container - name of the container to delete
        Returns:
        true if the container was deleted or does not exist
      • deletePathAndEnsureGone

        protected void deletePathAndEnsureGone​(String path)
      • listAssignableLocations

        public Set<? extends Location> listAssignableLocations()
        Description copied from interface: BlobStore
        The get locations command returns all the valid locations for containers. A location has a scope, which is typically region or zone. A region is a general area, like eu-west, where a zone is similar to a datacenter. If a location has a parent, that implies it is within that location. For example a location can be a rack, whose parent is likely to be a zone.
        Specified by:
        listAssignableLocations in interface BlobStore
      • deleteAndVerifyContainerGone

        protected abstract boolean deleteAndVerifyContainerGone​(String container)
        Delete a container if it is empty.
        Parameters:
        container - what to delete
        Returns:
        whether container was deleted
      • copyBlob

        public String copyBlob​(String fromContainer,
                               String fromName,
                               String toContainer,
                               String toName,
                               CopyOptions options)
        Description copied from interface: BlobStore
        Copy blob from one container to another. Some providers implement this more efficiently than corresponding getBlob and putBlob operations. Note: options are currently ignored
        Specified by:
        copyBlob in interface BlobStore
        Returns:
        ETag of new blob
      • putMultipartBlob

        @Beta
        protected String putMultipartBlob​(String container,
                                          Blob blob,
                                          PutOptions overrides)
        Upload using a user-provided executor, or the jclouds userExecutor
        Parameters:
        container -
        blob -
        overrides -
        Returns:
        the multipart blob etag
      • putMultipartBlob

        @Beta
        protected String putMultipartBlob​(String container,
                                          Blob blob,
                                          PutOptions overrides,
                                          com.google.common.util.concurrent.ListeningExecutorService executor)