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, 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, 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 BlobStoreContext
public BlobStore getBlobStore()
getBlobStore
in interface BlobStoreContext
public BlobRequestSigner getSigner()
BlobStoreContext
getSigner
in interface BlobStoreContext
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-2016 The Apache Software Foundation. All Rights Reserved.