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
|
String |
copyBlob(String fromContainer,
String fromName,
String toContainer,
String toName,
CopyOptions options)
Copy blob from one container to another.
|
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.
|
boolean |
deleteContainerIfEmpty(String container)
Deletes a container if it is empty.
|
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 |
BlobAccess |
getBlobAccess(String container,
String name) |
ContainerAccess |
getContainerAccess(String 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 |
void |
removeBlobs(String container,
Iterable<String> names)
Deletes multiple
Blob s representing the data at location container/name |
void |
setBlobAccess(String container,
String name,
BlobAccess access) |
void |
setContainerAccess(String name,
ContainerAccess access) |
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()
BlobStore
listAssignableLocations
in interface BlobStore
public PageSet<? extends StorageMetadata> list()
BlobStore
public boolean containerExists(String container)
BlobStore
containerExists
in interface BlobStore
public boolean createContainerInLocation(Location location, String container)
BlobStore
createContainerInLocation
in interface BlobStore
location
- 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 BlobStore
options
- controls default access controlBlobStore.createContainerInLocation(Location,String)
public ContainerAccess getContainerAccess(String name)
getContainerAccess
in interface BlobStore
public void setContainerAccess(String name, ContainerAccess access)
setContainerAccess
in interface BlobStore
public PageSet<? extends StorageMetadata> list(String container)
BlobStore
public PageSet<? extends StorageMetadata> list(String container, ListContainerOptions options)
BlobStore
BlobStore.list(String)
except you can control the size, recursion, and context of the list
using options
public boolean blobExists(String container, String name)
BlobStore
blobExists
in interface BlobStore
container
- container where the blob residespublic String putBlob(String container, Blob blob)
BlobStore
Blob
representing the data at location container/blob.metadata.name
public String putBlob(String container, Blob blob, PutOptions options)
BlobStore
Blob
representing the data at location container/blob.metadata.name
options using multipart strategies.public String copyBlob(String fromContainer, String fromName, String toContainer, String toName, CopyOptions options)
BlobStore
public BlobMetadata blobMetadata(String container, String name)
BlobStore
Blob
at location container/name
blobMetadata
in interface BlobStore
container
- container where this exists.name
- fully qualified name relative to the container.public Blob getBlob(String container, String key)
BlobStore
Blob
representing the data at location container/name
public Blob getBlob(String container, String name, GetOptions options)
BlobStore
Blob
representing the data at location container/name
public void removeBlob(String container, String name)
BlobStore
Blob
representing the data at location container/name
removeBlob
in interface BlobStore
container
- container where this exists.name
- fully qualified name relative to the container.public 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 BlobAccess getBlobAccess(String container, String name)
getBlobAccess
in interface BlobStore
public void setBlobAccess(String container, String name, BlobAccess access)
setBlobAccess
in interface BlobStore
public BlobStoreContext getContext()
getContext
in interface BlobStore
public BlobBuilder blobBuilder(String name)
blobBuilder
in interface BlobStore
Blob
spublic boolean directoryExists(String containerName, String directory)
BlobStore
directoryExists
in interface BlobStore
containerName
- container where the directory residesdirectory
- full path to the directorypublic void createDirectory(String containerName, String directory)
BlobStore
createDirectory
in interface BlobStore
containerName
- container to create the directory indirectory
- full path to the directorypublic void deleteDirectory(String containerName, String directory)
BlobStore
deleteDirectory
in interface BlobStore
public long countBlobs(String containerName)
countBlobs
in interface BlobStore
public void clearContainer(String containerName)
BlobStore
clearContainer
in interface BlobStore
containerName
- what to clearpublic void clearContainer(String containerName, ListContainerOptions options)
BlobStore
BlobStore.clearContainer(String)
except you can use options to do things like recursive
deletes, or clear at a different path than root.clearContainer
in interface BlobStore
containerName
- what to clearoptions
- recursion and path to clearpublic void deleteContainer(String container)
BlobStore
deleteContainer
in interface BlobStore
container
- what to deletepublic boolean deleteContainerIfEmpty(String container)
BlobStore
deleteContainerIfEmpty
in interface BlobStore
container
- name of the container to deleteprotected com.google.common.base.Function<SwiftObject,MutableBlobMetadata> toBlobMetadata(String container)
public long countBlobs(String containerName, ListContainerOptions options)
countBlobs
in interface BlobStore
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.