| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.cache.LoadingCache<String,com.google.common.base.Optional<Container>> |
containerCache |
| Modifier | Constructor and Description |
|---|---|
protected |
RegionScopedSwiftBlobStore(com.google.inject.Injector baseGraph,
BlobStoreContext context,
SwiftApi api,
com.google.common.base.Supplier<Set<? extends Location>> locations,
String regionId) |
| Modifier and Type | Method and Description |
|---|---|
BlobBuilder |
blobBuilder(String name) |
boolean |
blobExists(String container,
String name)
Determines if a blob exists
|
BlobMetadata |
blobMetadata(String container,
String name)
Retrieves the metadata of a
Blob at location container/name |
void |
clearContainer(String containerName)
This will delete the contents of a container at its root path without deleting the container
|
void |
clearContainer(String containerName,
ListContainerOptions options)
Like
BlobStore.clearContainer(String) except you can use options to do things like recursive
deletes, or clear at a different path than root. |
boolean |
containerExists(String container)
determines if a service-level container exists
|
long |
countBlobs(String containerName) |
long |
countBlobs(String containerName,
ListContainerOptions options) |
boolean |
createContainerInLocation(Location location,
String container)
Creates a namespace for your blobs
A container is a namespace for your objects.
|
boolean |
createContainerInLocation(Location location,
String container,
CreateContainerOptions options) |
void |
createDirectory(String containerName,
String directory)
Creates a folder or a directory marker depending on the service
|
void |
deleteContainer(String container)
This will delete everything inside a container recursively.
|
void |
deleteDirectory(String containerName,
String directory)
Deletes a folder or a directory marker depending on the service
|
boolean |
directoryExists(String containerName,
String directory)
Determines if a directory exists
|
Blob |
getBlob(String container,
String key)
Retrieves a
Blob representing the data at location container/name |
Blob |
getBlob(String container,
String name,
GetOptions options)
Retrieves a
Blob representing the data at location container/name |
BlobStoreContext |
getContext() |
PageSet<? extends StorageMetadata> |
list()
Lists all root-level resources available to the identity.
|
PageSet<? extends StorageMetadata> |
list(String container)
Lists all resources in a container non-recursive.
|
PageSet<? extends StorageMetadata> |
list(String container,
ListContainerOptions options)
Like
BlobStore.list(String) except you can control the size, recursion, and context of the list
using options |
Set<? extends Location> |
listAssignableLocations()
The get locations command returns all the valid locations for containers.
|
String |
putBlob(String container,
Blob blob)
Adds a
Blob representing the data at location container/blob.metadata.name |
String |
putBlob(String container,
Blob blob,
PutOptions options)
Adds a
Blob representing the data at location container/blob.metadata.name
options using multipart strategies. |
void |
removeBlob(String container,
String name)
Deletes a
Blob representing the data at location container/name |
protected com.google.common.base.Function<SwiftObject,MutableBlobMetadata> |
toBlobMetadata(String container) |
@Inject
protected RegionScopedSwiftBlobStore(com.google.inject.Injector baseGraph,
BlobStoreContext context,
SwiftApi api,
com.google.common.base.Supplier<Set<? extends Location>> locations,
String regionId)
public Set<? extends Location> listAssignableLocations()
BlobStorelistAssignableLocations in interface BlobStorepublic PageSet<? extends StorageMetadata> list()
BlobStorepublic boolean containerExists(String container)
BlobStorecontainerExists in interface BlobStorepublic boolean createContainerInLocation(Location location, String container)
BlobStorecreateContainerInLocation in interface BlobStorelocation - some blobstores allow you to specify a location, such as US-EAST, for where this
container will exist. null will choose a default locationcontainer - namespace. Typically constrained to lowercase alpha-numeric and hyphens.public boolean createContainerInLocation(Location location, String container, CreateContainerOptions options)
createContainerInLocation in interface BlobStoreoptions - controls default access controlBlobStore.createContainerInLocation(Location,String)public PageSet<? extends StorageMetadata> list(String container)
BlobStorepublic PageSet<? extends StorageMetadata> list(String container, ListContainerOptions options)
BlobStoreBlobStore.list(String) except you can control the size, recursion, and context of the list
using optionspublic boolean blobExists(String container, String name)
BlobStoreblobExists in interface BlobStorecontainer - container where the blob residespublic String putBlob(String container, Blob blob)
BlobStoreBlob representing the data at location container/blob.metadata.namepublic String putBlob(String container, Blob blob, PutOptions options)
BlobStoreBlob representing the data at location container/blob.metadata.name
options using multipart strategies.public BlobMetadata blobMetadata(String container, String name)
BlobStoreBlob at location container/nameblobMetadata in interface BlobStorecontainer - container where this exists.name - fully qualified name relative to the container.public Blob getBlob(String container, String key)
BlobStoreBlob representing the data at location container/namepublic Blob getBlob(String container, String name, GetOptions options)
BlobStoreBlob representing the data at location container/namepublic void removeBlob(String container, String name)
BlobStoreBlob representing the data at location container/nameremoveBlob in interface BlobStorecontainer - container where this exists.name - fully qualified name relative to the container.public BlobStoreContext getContext()
getContext in interface BlobStorepublic BlobBuilder blobBuilder(String name)
blobBuilder in interface BlobStoreBlobspublic boolean directoryExists(String containerName, String directory)
BlobStoredirectoryExists in interface BlobStorecontainerName - container where the directory residesdirectory - full path to the directorypublic void createDirectory(String containerName, String directory)
BlobStorecreateDirectory in interface BlobStorecontainerName - container to create the directory indirectory - full path to the directorypublic void deleteDirectory(String containerName, String directory)
BlobStoredeleteDirectory in interface BlobStorepublic long countBlobs(String containerName)
countBlobs in interface BlobStorepublic void clearContainer(String containerName)
BlobStoreclearContainer in interface BlobStorecontainerName - what to clearpublic void clearContainer(String containerName, ListContainerOptions options)
BlobStoreBlobStore.clearContainer(String) except you can use options to do things like recursive
deletes, or clear at a different path than root.clearContainer in interface BlobStorecontainerName - what to clearoptions - recursion and path to clearpublic void deleteContainer(String container)
BlobStoredeleteContainer in interface BlobStorecontainer - what to deleteprotected com.google.common.base.Function<SwiftObject,MutableBlobMetadata> toBlobMetadata(String container)
public long countBlobs(String containerName, ListContainerOptions options)
countBlobs in interface BlobStoreCopyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.