nacx commented on this pull request.


>        super(backend, backendType);
       this.consistencyModel = checkNotNull(consistencyModel, 
"consistencyModel");
       this.blobStore = checkNotNull(blobStore, "blobStore");
       this.utils = checkNotNull(utils, "utils");
       this.blobRequestSigner = checkNotNull(blobRequestSigner, 
"blobRequestSigner");
+      Binding<AsyncBlobStore> asyncBlobStoreBinding = 
injector.getExistingBinding(Key.get(AsyncBlobStore.class));
+      if (asyncBlobStoreBinding != null) {
+         asyncBlobStore = asyncBlobStoreBinding.getProvider().get();
+      } else {
+         asyncBlobStore = null;
+      }

Well, inheritance is not really the only option. You can:

* Make a base class with the optional binding and let all blobstore modules 
extend it, as mentioned above.
* Or you can create a separate module with that optional binding, say 
`AsyncBlobStoreModule`, and add it to the `defaultModules` in the metadata 
class of **all** blobstore providers.

The important thing is that all providers must have that binding in the Guice 
context, whether they use async or not.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1114#discussion_r125824928

Reply via email to