Class RegionScopedBlobStoreContext
java.lang.Object
com.google.common.collect.ForwardingObject
org.jclouds.internal.BaseView
org.jclouds.openstack.swift.v1.blobstore.RegionScopedBlobStoreContext
- All Implemented Interfaces:
Closeable,AutoCloseable,BlobStoreContext,View
Implementation of
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 Summary
ConstructorsConstructorDescriptionRegionScopedBlobStoreContext(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) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckRegionId(String regionId) voidclose()closes threads and resources related to this connection.booleangetBlobStore(String regionId) Generates signed requests for blobs.inthashCode()toString()utils()Methods inherited from class org.jclouds.internal.BaseView
delegate, getBackendType, string, unwrap, unwrap, unwrapApiMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jclouds.View
getBackendType, unwrap, unwrap, unwrapApi
-
Constructor Details
-
RegionScopedBlobStoreContext
@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)
-
-
Method Details
-
getConfiguredRegions
- Returns:
- regions supported in this context.
-
getBlobStore
- Parameters:
regionId- valid region id fromgetConfiguredRegions()- Throws:
IllegalArgumentException- ifregionIdwas invalid.
-
getSigner
- Parameters:
regionId- valid region id fromgetConfiguredRegions()- Throws:
IllegalArgumentException- ifregionIdwas invalid.
-
checkRegionId
-
getConsistencyModel
- Specified by:
getConsistencyModelin interfaceBlobStoreContext- Returns:
- best guess at the consistency model used in this BlobStore.
-
getBlobStore
- Specified by:
getBlobStorein interfaceBlobStoreContext- Returns:
- a portable interface for the BlobStore.
-
getSigner
Description copied from interface:BlobStoreContextGenerates signed requests for blobs. useful in other tools such as backup utilities.- Specified by:
getSignerin interfaceBlobStoreContext
-
utils
- Specified by:
utilsin interfaceBlobStoreContext
-
close
public void close()Description copied from interface:BlobStoreContextcloses threads and resources related to this connection.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBlobStoreContext- Specified by:
closein interfaceCloseable
-
hashCode
public int hashCode() -
toString
-
equals
-