public class TransientAsyncBlobStore extends BaseAsyncBlobStore
BaseAsyncBlobStore
which keeps all data in a local Map object.Modifier and Type | Class and Description |
---|---|
protected static class |
TransientAsyncBlobStore.CommonPrefixes |
protected static class |
TransientAsyncBlobStore.DelimiterFilter |
Modifier and Type | Field and Description |
---|---|
protected Blob.Factory |
blobFactory |
protected ConcurrentMap<String,ConcurrentMap<String,Blob>> |
containerToBlobs |
protected ConcurrentMap<String,Location> |
containerToLocation |
protected Crypto |
crypto |
protected DateService |
dateService |
protected HttpGetOptionsListToGetOptions |
httpGetOptionsConverter |
protected IfDirectoryReturnNameStrategy |
ifDirectoryReturnName |
protected Provider<UriBuilder> |
uriBuilders |
blobUtils, context, defaultLocation, locations, service
Modifier | Constructor and Description |
---|---|
protected |
TransientAsyncBlobStore(BlobStoreContext context,
DateService dateService,
Crypto crypto,
ConcurrentMap<String,ConcurrentMap<String,Blob>> containerToBlobs,
Provider<UriBuilder> uriBuilders,
ConcurrentMap<String,Location> containerToLocation,
HttpGetOptionsListToGetOptions httpGetOptionsConverter,
IfDirectoryReturnNameStrategy ifDirectoryReturnName,
Blob.Factory blobFactory,
BlobUtils blobUtils,
ExecutorService service,
com.google.common.base.Supplier<Location> defaultLocation,
com.google.common.base.Supplier<Set<? extends Location>> locations) |
Modifier and Type | Method and Description |
---|---|
com.google.common.util.concurrent.ListenableFuture<Boolean> |
blobExists(String containerName,
String key) |
com.google.common.util.concurrent.ListenableFuture<BlobMetadata> |
blobMetadata(String container,
String key) |
com.google.common.util.concurrent.ListenableFuture<Void> |
clearContainer(String container)
This implementation invokes
BaseAsyncBlobStore.clearContainer(java.lang.String) with the
ListContainerOptions.recursive option. |
com.google.common.util.concurrent.ListenableFuture<Boolean> |
containerExists(String container) |
static MutableBlobMetadata |
copy(MutableBlobMetadata in) |
static MutableBlobMetadata |
copy(MutableBlobMetadata in,
String newKey) |
protected MutableStorageMetadata |
create() |
com.google.common.util.concurrent.ListenableFuture<Boolean> |
createContainerInLocation(Location location,
String name) |
com.google.common.util.concurrent.ListenableFuture<Boolean> |
createContainerInLocation(Location location,
String container,
CreateContainerOptions options) |
com.google.common.util.concurrent.ListenableFuture<Void> |
createContainerInLocationIfAbsent(Location location,
String name)
throws IllegalStateException if the container already exists
|
protected Blob |
createUpdatedCopyOfBlobInContainer(String containerName,
Blob in) |
protected boolean |
deleteAndVerifyContainerGone(String container) |
com.google.common.util.concurrent.ListenableFuture<Void> |
deleteContainer(String container)
This implementation invokes
BaseAsyncBlobStore.deleteAndEnsurePathGone(java.lang.String) |
com.google.common.util.concurrent.ListenableFuture<Boolean> |
deleteContainerImpl(String container) |
static <T extends Comparable<?>> |
firstSliceOfSize(Iterable<T> elements,
int size) |
com.google.common.util.concurrent.ListenableFuture<Blob> |
getBlob(String containerName,
String key,
GetOptions options) |
ConcurrentMap<String,ConcurrentMap<String,Blob>> |
getContainerToBlobs() |
ConcurrentMap<String,Location> |
getContainerToLocation() |
String |
getFirstQueryOrNull(String string,
HttpRequestOptions options) |
com.google.common.util.concurrent.ListenableFuture<PageSet<? extends StorageMetadata>> |
list() |
com.google.common.util.concurrent.ListenableFuture<PageSet<? extends StorageMetadata>> |
list(String container,
ListContainerOptions options)
default maxResults is 1000
|
com.google.common.util.concurrent.ListenableFuture<String> |
putBlob(String containerName,
Blob in) |
com.google.common.util.concurrent.ListenableFuture<String> |
putBlob(String container,
Blob blob,
PutOptions options) |
com.google.common.util.concurrent.ListenableFuture<Blob> |
putBlobAndReturnOld(String containerName,
Blob in) |
com.google.common.util.concurrent.ListenableFuture<Void> |
removeBlob(String container,
String key) |
com.google.common.util.concurrent.ListenableFuture<Blob> |
removeBlobAndReturnOld(String container,
String key) |
static HttpResponseException |
returnResponseException(int code) |
blobBuilder, clearContainer, countBlobs, countBlobs, createDirectory, deleteAndEnsurePathGone, deleteDirectory, directoryExists, getBlob, getContext, list, listAssignableLocations
protected final DateService dateService
protected final Crypto crypto
protected final ConcurrentMap<String,ConcurrentMap<String,Blob>> containerToBlobs
protected final Provider<UriBuilder> uriBuilders
protected final ConcurrentMap<String,Location> containerToLocation
protected final HttpGetOptionsListToGetOptions httpGetOptionsConverter
protected final IfDirectoryReturnNameStrategy ifDirectoryReturnName
protected final Blob.Factory blobFactory
@Inject protected TransientAsyncBlobStore(BlobStoreContext context, DateService dateService, Crypto crypto, ConcurrentMap<String,ConcurrentMap<String,Blob>> containerToBlobs, Provider<UriBuilder> uriBuilders, ConcurrentMap<String,Location> containerToLocation, HttpGetOptionsListToGetOptions httpGetOptionsConverter, IfDirectoryReturnNameStrategy ifDirectoryReturnName, Blob.Factory blobFactory, BlobUtils blobUtils, @Named(value="jclouds.user-threads") ExecutorService service, com.google.common.base.Supplier<Location> defaultLocation, com.google.common.base.Supplier<Set<? extends Location>> locations)
public com.google.common.util.concurrent.ListenableFuture<PageSet<? extends StorageMetadata>> list(String container, ListContainerOptions options)
public static MutableBlobMetadata copy(MutableBlobMetadata in)
public static MutableBlobMetadata copy(MutableBlobMetadata in, String newKey)
public com.google.common.util.concurrent.ListenableFuture<Void> removeBlob(String container, String key)
public com.google.common.util.concurrent.ListenableFuture<Blob> removeBlobAndReturnOld(String container, String key)
public com.google.common.util.concurrent.ListenableFuture<Void> clearContainer(String container)
BaseAsyncBlobStore.clearContainer(java.lang.String)
with the
ListContainerOptions.recursive
option.clearContainer
in interface AsyncBlobStore
clearContainer
in class BaseAsyncBlobStore
container
- container nameBlobStore.clearContainer(String)
public com.google.common.util.concurrent.ListenableFuture<Void> deleteContainer(String container)
BaseAsyncBlobStore.deleteAndEnsurePathGone(java.lang.String)
deleteContainer
in interface AsyncBlobStore
deleteContainer
in class BaseAsyncBlobStore
container
- bucket nameBlobStore.deleteContainer(java.lang.String)
public com.google.common.util.concurrent.ListenableFuture<Boolean> deleteContainerImpl(String container)
public com.google.common.util.concurrent.ListenableFuture<Boolean> containerExists(String container)
public com.google.common.util.concurrent.ListenableFuture<PageSet<? extends StorageMetadata>> list()
BlobStore.list()
protected MutableStorageMetadata create()
public com.google.common.util.concurrent.ListenableFuture<Boolean> createContainerInLocation(Location location, String name)
public com.google.common.util.concurrent.ListenableFuture<Void> createContainerInLocationIfAbsent(Location location, String name)
public String getFirstQueryOrNull(String string, @Nullable HttpRequestOptions options)
public static <T extends Comparable<?>> SortedSet<T> firstSliceOfSize(Iterable<T> elements, int size)
public static HttpResponseException returnResponseException(int code)
public com.google.common.util.concurrent.ListenableFuture<String> putBlob(String containerName, Blob in)
BlobStore.putBlob(String,Blob)
public com.google.common.util.concurrent.ListenableFuture<Blob> putBlobAndReturnOld(String containerName, Blob in)
protected Blob createUpdatedCopyOfBlobInContainer(String containerName, Blob in)
public com.google.common.util.concurrent.ListenableFuture<Boolean> blobExists(String containerName, String key)
public com.google.common.util.concurrent.ListenableFuture<Blob> getBlob(String containerName, String key, GetOptions options)
public com.google.common.util.concurrent.ListenableFuture<BlobMetadata> blobMetadata(String container, String key)
public ConcurrentMap<String,ConcurrentMap<String,Blob>> getContainerToBlobs()
protected boolean deleteAndVerifyContainerGone(String container)
deleteAndVerifyContainerGone
in class BaseAsyncBlobStore
public ConcurrentMap<String,Location> getContainerToLocation()
public com.google.common.util.concurrent.ListenableFuture<String> putBlob(String container, Blob blob, PutOptions options)
public com.google.common.util.concurrent.ListenableFuture<Boolean> createContainerInLocation(Location location, String container, CreateContainerOptions options)
Copyright © 2009-2012 jclouds. All Rights Reserved.