Package org.jclouds.blobstore.internal
Class BaseBlobStore
java.lang.Object
org.jclouds.blobstore.internal.BaseBlobStore
- All Implemented Interfaces:
BlobStore
- Direct Known Subclasses:
AtmosBlobStore,AzureBlobStore,B2BlobStore,GlacierBlobStore,GoogleCloudStorageBlobStore,S3BlobStore
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BlobUtilsprotected final BlobStoreContextprotected final com.google.common.base.Supplier<Location> protected final PayloadSlicer -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseBlobStore(BlobStoreContext context, BlobUtils blobUtils, com.google.common.base.Supplier<Location> defaultLocation, com.google.common.base.Supplier<Set<? extends Location>> locations, PayloadSlicer slicer) -
Method Summary
Modifier and TypeMethodDescriptionblobBuilder(String name) invokesinvalid reference
BlobUtilsImpl#blobBuildervoidclearContainer(String containerName) This implementation invokesclearContainer(java.lang.String)with theListContainerOptions.recursiveoption.voidclearContainer(String containerName, ListContainerOptions options) This implementation invokesinvalid reference
BlobUtilsImpl#clearContainercopyBlob(String fromContainer, String fromName, String toContainer, String toName, CopyOptions options) Copy blob from one container to another.longcountBlobs(String container) This implementation invokescountBlobs(java.lang.String)with theListContainerOptions.recursiveoption.longcountBlobs(String containerName, ListContainerOptions options) This implementation invokesinvalid reference
BlobUtilsImpl#countBlobsvoidcreateDirectory(String containerName, String directory) This implementation invokesinvalid reference
BlobUtilsImpl#createDirectoryprotected abstract booleandeleteAndVerifyContainerGone(String container) Delete a container if it is empty.voiddeleteContainer(String container) This implementation invokesinvalid reference
#deleteAndEnsurePathGonebooleandeleteContainerIfEmpty(String container) Deletes a container if it is empty.voiddeleteDirectory(String containerName, String directory) This implementation invokes.invalid reference
BlobUtilsImpl#deleteDirectoryprotected voidbooleandirectoryExists(String containerName, String directory) This implementation invokesinvalid reference
BlobUtilsImpl#directoryExistsvoiddownloadBlob(String container, String name, File destination) voiddownloadBlob(String container, String name, File destination, ExecutorService executor) This implementation invokesBlobStore.getBlob(String,String,org.jclouds.blobstore.options.GetOptions)PageSet<? extends StorageMetadata> This implementation invokesBlobStore.list(String,org.jclouds.blobstore.options.ListContainerOptions)The get locations command returns all the valid locations for containers.protected StringputMultipartBlob(String container, Blob blob, PutOptions overrides) Upload using a user-provided executor, or the jclouds userExecutorprotected StringputMultipartBlob(String container, Blob blob, PutOptions overrides, com.google.common.util.concurrent.ListeningExecutorService executor) voidremoveBlobs(String container, Iterable<String> names) Deletes multipleBlobs representing the data at locationcontainer/namestreamBlob(String container, String name) streamBlob(String container, String name, ExecutorService executor) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jclouds.blobstore.BlobStore
abortMultipartUpload, blobExists, blobMetadata, completeMultipartUpload, containerExists, createContainerInLocation, createContainerInLocation, getBlob, getBlobAccess, getContainerAccess, getMaximumMultipartPartSize, getMaximumNumberOfParts, getMinimumMultipartPartSize, initiateMultipartUpload, list, list, listMultipartUpload, listMultipartUploads, putBlob, putBlob, removeBlob, setBlobAccess, setContainerAccess, uploadMultipartPart
-
Field Details
-
context
-
blobUtils
-
defaultLocation
-
locations
-
slicer
-
-
Constructor Details
-
BaseBlobStore
protected BaseBlobStore(BlobStoreContext context, BlobUtils blobUtils, com.google.common.base.Supplier<Location> defaultLocation, com.google.common.base.Supplier<Set<? extends Location>> locations, PayloadSlicer slicer)
-
-
Method Details
-
getContext
- Specified by:
getContextin interfaceBlobStore- Returns:
- a reference to the context that created this BlobStore.
-
blobBuilder
invokesinvalid reference
BlobUtilsImpl#blobBuilder- Specified by:
blobBuilderin interfaceBlobStore- Returns:
- builder for creating new
Blobs
-
list
This implementation invokesBlobStore.list(String,org.jclouds.blobstore.options.ListContainerOptions) -
directoryExists
This implementation invokesinvalid reference
BlobUtilsImpl#directoryExists- Specified by:
directoryExistsin interfaceBlobStore- Parameters:
containerName- container where the directory residesdirectory- virtual pathcontainer- container name
-
createDirectory
This implementation invokesinvalid reference
BlobUtilsImpl#createDirectory- Specified by:
createDirectoryin interfaceBlobStore- Parameters:
containerName- container to create the directory indirectory- virtual pathcontainer- container name
-
removeBlobs
Description copied from interface:BlobStoreDeletes multipleBlobs representing the data at locationcontainer/name- Specified by:
removeBlobsin interfaceBlobStore- Parameters:
container- container where this exists.names- fully qualified names relative to the container.
-
countBlobs
This implementation invokescountBlobs(java.lang.String)with theListContainerOptions.recursiveoption.- Specified by:
countBlobsin interfaceBlobStore- Parameters:
container- container name- Returns:
- a count of all blobs in the container, excluding directory markers
-
countBlobs
This implementation invokesinvalid reference
BlobUtilsImpl#countBlobs- Specified by:
countBlobsin interfaceBlobStore- Parameters:
container- container name- Returns:
- a count of all blobs that are in a listing constrained by the options specified, excluding directory markers
-
clearContainer
This implementation invokesclearContainer(java.lang.String)with theListContainerOptions.recursiveoption.- Specified by:
clearContainerin interfaceBlobStore- Parameters:
containerName- what to clearcontainer- container name
-
clearContainer
This implementation invokesinvalid reference
BlobUtilsImpl#clearContainer- Specified by:
clearContainerin interfaceBlobStore- Parameters:
containerName- what to clearoptions- recursion and path to clearcontainer- container name
-
deleteDirectory
This implementation invokes.invalid reference
BlobUtilsImpl#deleteDirectory- Specified by:
deleteDirectoryin interfaceBlobStore- Parameters:
container- container name
-
getBlob
This implementation invokesBlobStore.getBlob(String,String,org.jclouds.blobstore.options.GetOptions) -
deleteContainer
This implementation invokesinvalid reference
#deleteAndEnsurePathGone- Specified by:
deleteContainerin interfaceBlobStore- Parameters:
container- bucket name
-
deleteContainerIfEmpty
Description copied from interface:BlobStoreDeletes a container if it is empty.- Specified by:
deleteContainerIfEmptyin interfaceBlobStore- Parameters:
container- name of the container to delete- Returns:
- true if the container was deleted or does not exist
-
deletePathAndEnsureGone
-
listAssignableLocations
Description copied from interface:BlobStoreThe 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:
listAssignableLocationsin interfaceBlobStore
-
deleteAndVerifyContainerGone
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:BlobStoreCopy blob from one container to another. Some providers implement this more efficiently than corresponding getBlob and putBlob operations. Note: options are currently ignored -
putMultipartBlob
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) -
downloadBlob
- Specified by:
downloadBlobin interfaceBlobStore
-
downloadBlob
- Specified by:
downloadBlobin interfaceBlobStore
-
streamBlob
- Specified by:
streamBlobin interfaceBlobStore
-
streamBlob
- Specified by:
streamBlobin interfaceBlobStore
-