You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Andrew Phillips <no...@github.com> on 2013/10/26 23:57:45 UTC

Re: [jclouds-labs-openstack] JCLOUDS-299. implement multi-region support in openstack-swift (#34)

> +   private final Supplier<String> implicitRegionId;
> +   // factory functions are decoupled so that you can exchange how requests are
> +   // signed or decorate without a class hierarchy dependency
> +   private final Function<String, BlobStore> blobStore;
> +   private final Function<String, BlobRequestSigner> blobRequestSigner;
> +   private final Utils utils;
> +   private final ListeningExecutorService executor;
> +
> +   @Inject
> +   public RegionScopedBlobStoreContext(@Provider Context backend, @Provider TypeToken<? extends Context> backendType,
> +         @Region Supplier<Set<String>> regionIds, @Region Supplier<String> implicitRegionId,
> +         Function<String, BlobStore> blobStore, Function<String, BlobRequestSigner> blobRequestSigner, Utils utils,
> +         @Named(PROPERTY_USER_THREADS) ListeningExecutorService executor) {
> +      super(backend, backendType);
> +      this.regionIds = checkNotNull(regionIds, "regionIds");
> +      this.implicitRegionId = checkNotNull(implicitRegionId, "implicitRegionId");

Should we also invoke `checkRegionId` here to ensure the implicit region is one of the "regular" regions, or do we take that on trust?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/34/files#r7235186