public class RegionScopedBlobStoreContext extends BaseView implements BlobStoreContext
BlobStoreContext
which allows you to employ
multiple regions.
Example.
ctx = contextBuilder.buildView(RegionScopedBlobStoreContext.class); Set<String> regionIds = ctx.configuredRegions(); // isolated to a specific region BlobStore texasBlobStore = ctx.blobStoreInRegion("US-TX"); BlobStore virginiaBlobStore = ctx.blobStoreInRegion("US-VA");
Constructor and Description |
---|
RegionScopedBlobStoreContext(Context backend,
com.google.common.reflect.TypeToken<? extends Context> backendType,
com.google.common.base.Supplier<Set<String>> regionIds,
com.google.common.base.Supplier<String> implicitRegionId,
com.google.common.base.Function<String,BlobStore> blobStore,
com.google.common.base.Function<String,BlobRequestSigner> blobRequestSigner,
Utils utils,
com.google.common.util.concurrent.ListeningExecutorService executor) |
Modifier and Type | Method and Description |
---|---|
AsyncBlobStore |
asyncBlobStoreInRegion(String regionId)
Deprecated.
|
BlobStore |
blobStoreInRegion(String regionId) |
protected void |
checkRegionId(String regionId) |
void |
close()
closes threads and resources related to this connection.
|
Set<String> |
configuredRegions() |
boolean |
equals(Object obj) |
AsyncBlobStore |
getAsyncBlobStore()
Deprecated.
|
BlobStore |
getBlobStore() |
ConsistencyModel |
getConsistencyModel() |
BlobRequestSigner |
getSigner()
Generates signed requests for blobs.
|
int |
hashCode() |
BlobRequestSigner |
signerInRegion(String regionId) |
String |
toString() |
Utils |
utils() |
delegate, getBackendType, string, unwrap, unwrap, unwrapApi
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getBackendType, unwrap, unwrap, unwrapApi
@Inject public RegionScopedBlobStoreContext(Context backend, com.google.common.reflect.TypeToken<? extends Context> backendType, com.google.common.base.Supplier<Set<String>> regionIds, com.google.common.base.Supplier<String> implicitRegionId, com.google.common.base.Function<String,BlobStore> blobStore, com.google.common.base.Function<String,BlobRequestSigner> blobRequestSigner, Utils utils, @Named(value="jclouds.user-threads") com.google.common.util.concurrent.ListeningExecutorService executor)
public BlobStore blobStoreInRegion(String regionId)
regionId
- valid region id from configuredRegions()
IllegalArgumentException
- if regionId
was invalid.public BlobRequestSigner signerInRegion(String regionId)
regionId
- valid region id from configuredRegions()
IllegalArgumentException
- if regionId
was invalid.@Deprecated public AsyncBlobStore asyncBlobStoreInRegion(String regionId)
regionId
- valid region id from configuredRegions()
IllegalArgumentException
- if regionId
was invalid. longer supported. Please use
BlobStore
protected void checkRegionId(String regionId)
public ConsistencyModel getConsistencyModel()
getConsistencyModel
in interface BlobStoreContext
public BlobStore getBlobStore()
getBlobStore
in interface BlobStoreContext
public BlobRequestSigner getSigner()
BlobStoreContext
getSigner
in interface BlobStoreContext
@Deprecated public AsyncBlobStore getAsyncBlobStore()
getAsyncBlobStore
in interface BlobStoreContext
Future
s for each call.public Utils utils()
utils
in interface BlobStoreContext
public void close()
BlobStoreContext
close
in interface Closeable
close
in interface AutoCloseable
close
in interface BlobStoreContext
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.