public abstract class BaseBlobStore extends Object implements BlobStore
Modifier and Type | Field and Description |
---|---|
protected BlobUtils |
blobUtils |
protected BlobStoreContext |
context |
protected com.google.common.base.Supplier<Location> |
defaultLocation |
protected com.google.common.base.Supplier<Set<? extends Location>> |
locations |
protected PayloadSlicer |
slicer |
Modifier | Constructor and Description |
---|---|
protected |
BaseBlobStore(BlobStoreContext context,
BlobUtils blobUtils,
com.google.common.base.Supplier<Location> defaultLocation,
com.google.common.base.Supplier<Set<? extends Location>> locations,
PayloadSlicer slicer) |
Modifier and Type | Method and Description |
---|---|
BlobBuilder |
blobBuilder(String name)
invokes
BlobUtilsImpl#blobBuilder |
void |
clearContainer(String containerName)
This implementation invokes
clearContainer(java.lang.String) with the
ListContainerOptions.recursive option. |
void |
clearContainer(String containerName,
ListContainerOptions options)
This implementation invokes
BlobUtilsImpl#clearContainer |
String |
copyBlob(String fromContainer,
String fromName,
String toContainer,
String toName,
CopyOptions options)
Copy blob from one container to another.
|
long |
countBlobs(String container)
This implementation invokes
countBlobs(java.lang.String) with the
ListContainerOptions.recursive option. |
long |
countBlobs(String containerName,
ListContainerOptions options)
This implementation invokes
BlobUtilsImpl#countBlobs |
void |
createDirectory(String containerName,
String directory)
This implementation invokes
BlobUtilsImpl#createDirectory |
protected abstract boolean |
deleteAndVerifyContainerGone(String container)
Delete a container if it is empty.
|
void |
deleteContainer(String container)
This implementation invokes
#deleteAndEnsurePathGone |
boolean |
deleteContainerIfEmpty(String container)
Deletes a container if it is empty.
|
void |
deleteDirectory(String containerName,
String directory)
This implementation invokes
BlobUtilsImpl#deleteDirectory . |
protected void |
deletePathAndEnsureGone(String path) |
boolean |
directoryExists(String containerName,
String directory)
This implementation invokes
BlobUtilsImpl#directoryExists |
void |
downloadBlob(String container,
String name,
File destination) |
void |
downloadBlob(String container,
String name,
File destination,
ExecutorService executor) |
Blob |
getBlob(String container,
String key)
This implementation invokes
BlobStore.getBlob(String,String,org.jclouds.blobstore.options.GetOptions) |
BlobStoreContext |
getContext() |
PageSet<? extends StorageMetadata> |
list(String container)
This implementation invokes
BlobStore.list(String,org.jclouds.blobstore.options.ListContainerOptions) |
Set<? extends Location> |
listAssignableLocations()
The get locations command returns all the valid locations for containers.
|
protected String |
putMultipartBlob(String container,
Blob blob,
PutOptions overrides)
Upload using a user-provided executor, or the jclouds userExecutor
|
protected String |
putMultipartBlob(String container,
Blob blob,
PutOptions overrides,
com.google.common.util.concurrent.ListeningExecutorService executor) |
void |
removeBlobs(String container,
Iterable<String> names)
Deletes multiple
Blob s representing the data at location container/name |
InputStream |
streamBlob(String container,
String name) |
InputStream |
streamBlob(String container,
String name,
ExecutorService executor) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
abortMultipartUpload, blobExists, blobMetadata, completeMultipartUpload, containerExists, createContainerInLocation, createContainerInLocation, getBlob, getBlobAccess, getContainerAccess, getMaximumMultipartPartSize, getMaximumNumberOfParts, getMinimumMultipartPartSize, initiateMultipartUpload, list, list, listMultipartUpload, listMultipartUploads, putBlob, putBlob, removeBlob, setBlobAccess, setContainerAccess, uploadMultipartPart
protected final BlobStoreContext context
protected final BlobUtils blobUtils
protected final com.google.common.base.Supplier<Location> defaultLocation
protected final PayloadSlicer slicer
protected BaseBlobStore(BlobStoreContext context, BlobUtils blobUtils, com.google.common.base.Supplier<Location> defaultLocation, com.google.common.base.Supplier<Set<? extends Location>> locations, PayloadSlicer slicer)
public BlobStoreContext getContext()
getContext
in interface BlobStore
public BlobBuilder blobBuilder(String name)
BlobUtilsImpl#blobBuilder
blobBuilder
in interface BlobStore
Blob
spublic PageSet<? extends StorageMetadata> list(String container)
BlobStore.list(String,org.jclouds.blobstore.options.ListContainerOptions)
public boolean directoryExists(String containerName, String directory)
BlobUtilsImpl#directoryExists
directoryExists
in interface BlobStore
container
- container namedirectory
- virtual pathpublic void createDirectory(String containerName, String directory)
BlobUtilsImpl#createDirectory
createDirectory
in interface BlobStore
container
- container namedirectory
- virtual pathpublic void removeBlobs(String container, Iterable<String> names)
BlobStore
Blob
s representing the data at location container/name
removeBlobs
in interface BlobStore
container
- container where this exists.names
- fully qualified names relative to the container.public long countBlobs(String container)
countBlobs(java.lang.String)
with the
ListContainerOptions.recursive
option.countBlobs
in interface BlobStore
container
- container namepublic long countBlobs(String containerName, ListContainerOptions options)
BlobUtilsImpl#countBlobs
countBlobs
in interface BlobStore
container
- container namepublic void clearContainer(String containerName)
clearContainer(java.lang.String)
with the
ListContainerOptions.recursive
option.clearContainer
in interface BlobStore
container
- container namepublic void clearContainer(String containerName, ListContainerOptions options)
BlobUtilsImpl#clearContainer
clearContainer
in interface BlobStore
container
- container namepublic void deleteDirectory(String containerName, String directory)
BlobUtilsImpl#deleteDirectory
.deleteDirectory
in interface BlobStore
container
- container namepublic Blob getBlob(String container, String key)
BlobStore.getBlob(String,String,org.jclouds.blobstore.options.GetOptions)
public void deleteContainer(String container)
#deleteAndEnsurePathGone
deleteContainer
in interface BlobStore
container
- bucket namepublic boolean deleteContainerIfEmpty(String container)
BlobStore
deleteContainerIfEmpty
in interface BlobStore
container
- name of the container to deleteprotected void deletePathAndEnsureGone(String path)
public Set<? extends Location> listAssignableLocations()
BlobStore
listAssignableLocations
in interface BlobStore
protected abstract boolean deleteAndVerifyContainerGone(String container)
container
- what to deletepublic String copyBlob(String fromContainer, String fromName, String toContainer, String toName, CopyOptions options)
BlobStore
@Beta protected String putMultipartBlob(String container, Blob blob, PutOptions overrides)
container
- blob
- overrides
- @Beta protected String putMultipartBlob(String container, Blob blob, PutOptions overrides, com.google.common.util.concurrent.ListeningExecutorService executor)
public void downloadBlob(String container, String name, File destination)
downloadBlob
in interface BlobStore
public void downloadBlob(String container, String name, File destination, ExecutorService executor)
downloadBlob
in interface BlobStore
public InputStream streamBlob(String container, String name)
streamBlob
in interface BlobStore
public InputStream streamBlob(String container, String name, ExecutorService executor)
streamBlob
in interface BlobStore
Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.