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.getConfiguredRegions();
// isolated to a specific region
BlobStore texasBlobStore = ctx.getBlobStore("US-TX");
BlobStore virginiaBlobStore = ctx.getBlobStore("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,
ConsistencyModel consistencyModel) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkRegionId(String regionId) |
void |
close()
closes threads and resources related to this connection.
|
boolean |
equals(Object obj) |
BlobStore |
getBlobStore() |
BlobStore |
getBlobStore(String regionId) |
Set<String> |
getConfiguredRegions() |
ConsistencyModel |
getConsistencyModel() |
BlobRequestSigner |
getSigner()
Generates signed requests for blobs.
|
BlobRequestSigner |
getSigner(String regionId) |
int |
hashCode() |
String |
toString() |
Utils |
utils() |
delegate, getBackendType, string, unwrap, unwrap, unwrapApiclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBackendType, 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, ConsistencyModel consistencyModel)
public Set<String> getConfiguredRegions()
public BlobStore getBlobStore(String regionId)
regionId - valid region id from getConfiguredRegions()IllegalArgumentException - if regionId was invalid.public BlobRequestSigner getSigner(String regionId)
regionId - valid region id from getConfiguredRegions()IllegalArgumentException - if regionId was invalid.protected void checkRegionId(String regionId)
public ConsistencyModel getConsistencyModel()
getConsistencyModel in interface BlobStoreContextpublic BlobStore getBlobStore()
getBlobStore in interface BlobStoreContextpublic BlobRequestSigner getSigner()
BlobStoreContextgetSigner in interface BlobStoreContextpublic Utils utils()
utils in interface BlobStoreContextpublic void close()
BlobStoreContextclose in interface Closeableclose in interface AutoCloseableclose in interface BlobStoreContextCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.