rename bindMappedApi -> bindSyncToAsyncApi

This commit is contained in:
adriancole 2013-04-10 08:57:32 -07:00
parent df258a49d4
commit fbe9f945e7
3 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@
*/ */
package org.jclouds.filesystem.config; package org.jclouds.filesystem.config;
import static org.jclouds.rest.config.BinderUtils.bindMappedApi; import static org.jclouds.rest.config.BinderUtils.bindSyncToAsyncApi;
import org.jclouds.blobstore.AsyncBlobStore; import org.jclouds.blobstore.AsyncBlobStore;
import org.jclouds.blobstore.BlobRequestSigner; import org.jclouds.blobstore.BlobRequestSigner;
@ -50,7 +50,7 @@ public class FilesystemBlobStoreContextModule extends AbstractModule {
protected void configure() { protected void configure() {
bind(AsyncBlobStore.class).to(LocalAsyncBlobStore.class).asEagerSingleton(); bind(AsyncBlobStore.class).to(LocalAsyncBlobStore.class).asEagerSingleton();
// forward all requests from TransientBlobStore to TransientAsyncBlobStore. needs above binding as cannot proxy a class // forward all requests from TransientBlobStore to TransientAsyncBlobStore. needs above binding as cannot proxy a class
bindMappedApi(binder(), LocalBlobStore.class, AsyncBlobStore.class); bindSyncToAsyncApi(binder(), LocalBlobStore.class, AsyncBlobStore.class);
bind(BlobStore.class).to(LocalBlobStore.class); bind(BlobStore.class).to(LocalBlobStore.class);
install(new BlobStoreObjectModule()); install(new BlobStoreObjectModule());

View File

@ -18,7 +18,7 @@
*/ */
package org.jclouds.blobstore.config; package org.jclouds.blobstore.config;
import static org.jclouds.rest.config.BinderUtils.bindMappedApi; import static org.jclouds.rest.config.BinderUtils.bindSyncToAsyncApi;
import org.jclouds.blobstore.AsyncBlobStore; import org.jclouds.blobstore.AsyncBlobStore;
import org.jclouds.blobstore.BlobRequestSigner; import org.jclouds.blobstore.BlobRequestSigner;
@ -41,7 +41,7 @@ public class TransientBlobStoreContextModule extends AbstractModule {
protected void configure() { protected void configure() {
bind(AsyncBlobStore.class).to(LocalAsyncBlobStore.class).asEagerSingleton(); bind(AsyncBlobStore.class).to(LocalAsyncBlobStore.class).asEagerSingleton();
// forward all requests from TransientBlobStore to TransientAsyncBlobStore. needs above binding as cannot proxy a class // forward all requests from TransientBlobStore to TransientAsyncBlobStore. needs above binding as cannot proxy a class
bindMappedApi(binder(), LocalBlobStore.class, AsyncBlobStore.class); bindSyncToAsyncApi(binder(), LocalBlobStore.class, AsyncBlobStore.class);
install(new BlobStoreObjectModule()); install(new BlobStoreObjectModule());
install(new BlobStoreMapModule()); install(new BlobStoreMapModule());
bind(BlobStore.class).to(LocalBlobStore.class); bind(BlobStore.class).to(LocalBlobStore.class);

View File

@ -129,7 +129,7 @@ public class BinderUtils {
* longer supported. * longer supported.
*/ */
@Deprecated @Deprecated
public static <S, A> void bindMappedApi(Binder binder, Class<S> sync, Class<A> async) { public static <S, A> void bindSyncToAsyncApi(Binder binder, Class<S> sync, Class<A> async) {
bindClass(binder, sync); bindClass(binder, sync);
bindClass(binder, async); bindClass(binder, async);
bindCallGetOnFutures(binder, sync, async); bindCallGetOnFutures(binder, sync, async);