Examples of ExecutorServiceModule


Examples of org.jclouds.concurrent.config.ExecutorServiceModule

   protected LoadingCache<Image, Master> mastersCache;
   private String masterName;  

   @Override
   protected Iterable<Module> setupModules() {
      return ImmutableSet.<Module> of(getLoggingModule(), credentialStoreModule, getSshModule()new ExecutorServiceModule(
            sameThreadExecutor(), sameThreadExecutor()));
   }
View Full Code Here

Examples of org.jclouds.concurrent.config.ExecutorServiceModule

      bind(LocalBlobStore.class).annotatedWith(Names.named("databags"))
            .toInstance(
                  ContextBuilder
                        .newBuilder(new TransientApiMetadata())
                        .modules(
                              ImmutableSet.<Module> of(new ExecutorServiceModule(sameThreadExecutor(),
                                    sameThreadExecutor()))).buildInjector().getInstance(LocalBlobStore.class));
   }
View Full Code Here

Examples of org.jclouds.concurrent.config.ExecutorServiceModule

   private AnonymousAttributesApi getAnonymousAttributesApi(URI queue) {
      return ContextBuilder.newBuilder(
                  forClientMappedToAsyncClientOnEndpoint(AnonymousAttributesApi.class,
                        AnonymousAttributesAsyncApi.class, queue.toASCIIString()))
            .modules(ImmutableSet.<Module> of(new ExecutorServiceModule(sameThreadExecutor(), sameThreadExecutor())))
            .buildApi(AnonymousAttributesApi.class);
   }
View Full Code Here

Examples of org.jclouds.concurrent.config.ExecutorServiceModule

      replay(executor);

      DelegatingApi api = ContextBuilder.newBuilder(provider)
                                        .modules(ImmutableSet.<Module> builder()
                                                             .add(new ExecutorServiceModule(executor, executor))
                                                             .build())
                                        .buildApi(DelegatingApi.class);
      api.close();
      verify(executor);
   }
View Full Code Here

Examples of org.jclouds.concurrent.config.ExecutorServiceModule

      bind(LocalBlobStore.class).annotatedWith(Names.named("databags"))
            .toInstance(
                  ContextBuilder
                        .newBuilder(new TransientApiMetadata())
                        .modules(
                              ImmutableSet.<Module> of(new ExecutorServiceModule(sameThreadExecutor(),
                                    sameThreadExecutor()))).buildInjector().getInstance(LocalBlobStore.class));
   }
View Full Code Here

Examples of org.jclouds.concurrent.config.ExecutorServiceModule

         if (any(modules, new Predicate<Module>() {
            public boolean apply(Module input) {
               return input.getClass().isAnnotationPresent(SingleThreaded.class);
            }
         })) {
            modules.add(new ExecutorServiceModule(sameThreadExecutor(), sameThreadExecutor()));
         } else {
            modules.add(new ExecutorServiceModule());
         }
      }
   }
View Full Code Here

Examples of org.jclouds.concurrent.config.ExecutorServiceModule

      Injector i = Guice.createInjector(new AbstractModule() {
         protected void configure() {
            bindConstant().annotatedWith(named(PROPERTY_IO_WORKER_THREADS)).to(1);
            bindConstant().annotatedWith(named(PROPERTY_USER_THREADS)).to(1);
         }
      }, new LifeCycleModule(), new ExecutorServiceModule());
      // TODO: currently have to manually invoke the execution list, as otherwise it may occur
      // before everything is wired up
      i.getInstance(ExecutionList.class).execute();
      return i;
   }
View Full Code Here

Examples of org.jclouds.concurrent.config.ExecutorServiceModule

   protected LoadingCache<Image, Master> mastersCache;
   private String masterName;  

   @Override
   protected Iterable<Module> setupModules() {
      return ImmutableSet.<Module> of(getLoggingModule(), credentialStoreModule, getSshModule()new ExecutorServiceModule(
            sameThreadExecutor(), sameThreadExecutor()));
   }
View Full Code Here

Examples of org.jclouds.concurrent.config.ExecutorServiceModule

@SingleThreaded
public class GoogleAppEngineConfigurationModule extends AbstractModule {
   private final Module userExecutorModule;

   public GoogleAppEngineConfigurationModule() {
      this(new ExecutorServiceModule(sameThreadExecutor(), sameThreadExecutor()));
   }
View Full Code Here

Examples of org.jclouds.concurrent.config.ExecutorServiceModule

      return ContextBuilder.newBuilder("hpcloud-objectstorage") //
            .credentials("jclouds:joe", "letmein") //
            .endpoint(uri) //
            .overrides(overrides) //
            .modules(ImmutableSet.<Module> of(new ExecutorServiceModule(sameThreadExecutor(), sameThreadExecutor()))) //
            .buildApi(HPCloudObjectStorageApi.class);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.