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 |
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) |
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 |
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.
|
void |
removeBlobs(String container,
Iterable<String> names)
Deletes multiple
Blob s representing the data at location container/name |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
blobExists, blobMetadata, containerExists, createContainerInLocation, createContainerInLocation, getBlob, getBlobAccess, getContainerAccess, list, list, putBlob, putBlob, removeBlob, setBlobAccess, setContainerAccess
protected final BlobStoreContext context
protected final BlobUtils blobUtils
protected final com.google.common.base.Supplier<Location> defaultLocation
@Inject protected BaseBlobStore(BlobStoreContext context, BlobUtils blobUtils, com.google.common.base.Supplier<Location> defaultLocation, com.google.common.base.Supplier<Set<? extends Location>> locations)
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
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.