Modifier and Type | Field and Description |
---|---|
protected com.google.common.cache.LoadingCache<String,com.google.common.base.Optional<Container>> |
containerCache |
protected Logger |
logger |
protected int |
retryCountLimit |
protected PayloadSlicer |
slicer |
protected com.google.common.util.concurrent.ListeningExecutorService |
userExecutor |
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,
PayloadSlicer slicer,
com.google.common.util.concurrent.ListeningExecutorService userExecutor) |
Modifier and Type | Method and Description |
---|---|
void |
abortMultipartUpload(MultipartUpload mpu) |
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. |
String |
completeMultipartUpload(MultipartUpload mpu,
List<MultipartPart> parts) |
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
|
void |
downloadBlob(String container,
String name,
File destination) |
void |
downloadBlob(String container,
String name,
File destination,
ExecutorService executor) |
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() |
long |
getMaximumMultipartPartSize() |
int |
getMaximumNumberOfParts() |
long |
getMinimumMultipartPartSize() |
MultipartUpload |
initiateMultipartUpload(String container,
BlobMetadata blobMetadata,
PutOptions options) |
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.
|
List<MultipartPart> |
listMultipartUpload(MultipartUpload mpu) |
List<MultipartUpload> |
listMultipartUploads(String container) |
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. |
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 |
removeBlob(String container,
String name)
Deletes a
Blob representing the data at location container/name |
void |
removeBlobs(String container,
Iterable<String> names)
Delete multiple single-part objects.
|
void |
setBlobAccess(String container,
String name,
BlobAccess access) |
void |
setContainerAccess(String name,
ContainerAccess access) |
InputStream |
streamBlob(String container,
String name) |
InputStream |
streamBlob(String container,
String name,
ExecutorService executor) |
protected com.google.common.base.Function<SwiftObject,MutableBlobMetadata> |
toBlobMetadata(String container) |
MultipartPart |
uploadMultipartPart(MultipartUpload mpu,
int partNumber,
Payload payload) |
protected final PayloadSlicer slicer
protected final com.google.common.util.concurrent.ListeningExecutorService userExecutor
protected Logger logger
protected final com.google.common.cache.LoadingCache<String,com.google.common.base.Optional<Container>> containerCache
@Inject(optional=true) @Named(value="jclouds.max-retries") protected int retryCountLimit
@Inject protected RegionScopedSwiftBlobStore(com.google.inject.Injector baseGraph, BlobStoreContext context, SwiftApi api, com.google.common.base.Supplier<Set<? extends Location>> locations, String regionId, PayloadSlicer slicer, @Named(value="jclouds.user-threads") com.google.common.util.concurrent.ListeningExecutorService userExecutor)
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)
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 MultipartUpload initiateMultipartUpload(String container, BlobMetadata blobMetadata, PutOptions options)
initiateMultipartUpload
in interface BlobStore
public void abortMultipartUpload(MultipartUpload mpu)
abortMultipartUpload
in interface BlobStore
public String completeMultipartUpload(MultipartUpload mpu, List<MultipartPart> parts)
completeMultipartUpload
in interface BlobStore
public MultipartPart uploadMultipartPart(MultipartUpload mpu, int partNumber, Payload payload)
uploadMultipartPart
in interface BlobStore
public List<MultipartPart> listMultipartUpload(MultipartUpload mpu)
listMultipartUpload
in interface BlobStore
public List<MultipartUpload> listMultipartUploads(String container)
listMultipartUploads
in interface BlobStore
public long getMinimumMultipartPartSize()
getMinimumMultipartPartSize
in interface BlobStore
public long getMaximumMultipartPartSize()
getMaximumMultipartPartSize
in interface BlobStore
public int getMaximumNumberOfParts()
getMaximumNumberOfParts
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
@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)
@Beta public void downloadBlob(String container, String name, File destination)
downloadBlob
in interface BlobStore
@Beta public void downloadBlob(String container, String name, File destination, ExecutorService executor)
downloadBlob
in interface BlobStore
@Beta public InputStream streamBlob(String container, String name)
streamBlob
in interface BlobStore
@Beta public InputStream streamBlob(String container, String name, ExecutorService executor)
streamBlob
in interface BlobStore
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.