mirror of https://github.com/apache/jclouds.git
Fixed transient blobStorage build.
Refactored to use LocalAsyncBlobStore to be aligned with:
562f8277d3
This commit is contained in:
parent
4113cadb24
commit
0a4362c561
|
@ -36,7 +36,7 @@ import javax.inject.Named;
|
|||
import javax.inject.Singleton;
|
||||
|
||||
import org.jclouds.Constants;
|
||||
import org.jclouds.blobstore.TransientAsyncBlobStore;
|
||||
import org.jclouds.blobstore.LocalAsyncBlobStore;
|
||||
import org.jclouds.blobstore.domain.Blob;
|
||||
import org.jclouds.blobstore.domain.PageSet;
|
||||
import org.jclouds.blobstore.domain.StorageMetadata;
|
||||
|
@ -93,13 +93,13 @@ public class TransientChefAsyncApi implements ChefAsyncApi {
|
|||
}
|
||||
}
|
||||
|
||||
private final TransientAsyncBlobStore databags;
|
||||
private final LocalAsyncBlobStore databags;
|
||||
private final ExecutorService executor;
|
||||
private final BlobToDatabagItem blobToDatabagItem;
|
||||
private final StorageMetadataToName storageMetadataToName;
|
||||
|
||||
@Inject
|
||||
TransientChefAsyncApi(@Named("databags") TransientAsyncBlobStore databags,
|
||||
TransientChefAsyncApi(@Named("databags") LocalAsyncBlobStore databags,
|
||||
StorageMetadataToName storageMetadataToName, BlobToDatabagItem blobToDatabagItem,
|
||||
@Named(Constants.PROPERTY_USER_THREADS) ExecutorService executor) {
|
||||
this.databags = checkNotNull(databags, "databags");
|
||||
|
|
|
@ -27,8 +27,8 @@ import java.util.Map;
|
|||
import javax.inject.Singleton;
|
||||
|
||||
import org.jclouds.ContextBuilder;
|
||||
import org.jclouds.blobstore.LocalAsyncBlobStore;
|
||||
import org.jclouds.blobstore.TransientApiMetadata;
|
||||
import org.jclouds.blobstore.TransientAsyncBlobStore;
|
||||
import org.jclouds.chef.ChefApi;
|
||||
import org.jclouds.chef.ChefAsyncApi;
|
||||
import org.jclouds.chef.domain.Client;
|
||||
|
@ -71,11 +71,11 @@ public class TransientChefApiModule extends AbstractModule {
|
|||
BinderUtils.bindClient(binder(), TransientChefApi.class, ChefAsyncApi.class, ImmutableMap.<Class<?>, Class<?>>of());
|
||||
bind(ChefApi.class).to(TransientChefApi.class);
|
||||
|
||||
bind(TransientAsyncBlobStore.class).annotatedWith(Names.named("databags")).toInstance(
|
||||
bind(LocalAsyncBlobStore.class).annotatedWith(Names.named("databags")).toInstance(
|
||||
ContextBuilder.newBuilder(new TransientApiMetadata()).modules(
|
||||
ImmutableSet.<Module> of(new ExecutorServiceModule(MoreExecutors.sameThreadExecutor(),
|
||||
MoreExecutors.sameThreadExecutor()))).buildInjector().getInstance(
|
||||
TransientAsyncBlobStore.class));
|
||||
LocalAsyncBlobStore.class));
|
||||
|
||||
bind(Statement.class).annotatedWith(Names.named("installChefGems")).to(InstallChefGems.class);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue