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,org.jclouds.View
public class RegionScopedBlobStoreContext extends org.jclouds.internal.BaseView implements BlobStoreContext
Implementation ofBlobStoreContextwhich 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
Constructors Constructor Description RegionScopedBlobStoreContext(org.jclouds.Context backend, com.google.common.reflect.TypeToken<? extends org.jclouds.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, org.jclouds.rest.Utils utils, ConsistencyModel consistencyModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckRegionId(String regionId)voidclose()booleanequals(Object obj)BlobStoregetBlobStore()BlobStoregetBlobStore(String regionId)Set<String>getConfiguredRegions()ConsistencyModelgetConsistencyModel()BlobRequestSignergetSigner()BlobRequestSignergetSigner(String regionId)inthashCode()StringtoString()org.jclouds.rest.Utilsutils()-
Methods inherited from class org.jclouds.internal.BaseView
delegate, getBackendType, string, unwrap, unwrap, unwrapApi
-
-
-
-
Constructor Detail
-
RegionScopedBlobStoreContext
@Inject public RegionScopedBlobStoreContext(org.jclouds.Context backend, com.google.common.reflect.TypeToken<? extends org.jclouds.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, org.jclouds.rest.Utils utils, ConsistencyModel consistencyModel)
-
-
Method Detail
-
getConfiguredRegions
public Set<String> getConfiguredRegions()
- Returns:
- regions supported in this context.
-
getBlobStore
public BlobStore getBlobStore(String regionId)
- Parameters:
regionId- valid region id fromgetConfiguredRegions()- Throws:
IllegalArgumentException- ifregionIdwas invalid.
-
getSigner
public BlobRequestSigner getSigner(String regionId)
- Parameters:
regionId- valid region id fromgetConfiguredRegions()- Throws:
IllegalArgumentException- ifregionIdwas invalid.
-
checkRegionId
protected void checkRegionId(String regionId)
-
getConsistencyModel
public ConsistencyModel getConsistencyModel()
- Specified by:
getConsistencyModelin interfaceBlobStoreContext
-
getBlobStore
public BlobStore getBlobStore()
- Specified by:
getBlobStorein interfaceBlobStoreContext
-
getSigner
public BlobRequestSigner getSigner()
- Specified by:
getSignerin interfaceBlobStoreContext
-
utils
public org.jclouds.rest.Utils utils()
- Specified by:
utilsin interfaceBlobStoreContext
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBlobStoreContext- Specified by:
closein interfaceCloseable
-
hashCode
public int hashCode()
- Overrides:
hashCodein classorg.jclouds.internal.BaseView
-
toString
public String toString()
- Overrides:
toStringin classorg.jclouds.internal.BaseView
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classorg.jclouds.internal.BaseView
-
-