Class ExecutorServiceModule

java.lang.Object
com.google.inject.AbstractModule
org.jclouds.concurrent.config.ExecutorServiceModule
All Implemented Interfaces:
com.google.inject.Module
Direct Known Subclasses:
EnterpriseConfigurationModule

public class ExecutorServiceModule extends com.google.inject.AbstractModule
Configures ListeningExecutorService. Note that this uses threads.

This extends the underlying Future to expose a description (the task's toString) and the submission context (stack trace). The submission stack trace is appended to relevant stack traces on exceptions that are returned, so the user can see the logical chain of execution (in the executor, and where it was passed to the executor).

  • Constructor Summary

    Constructors
    Constructor
    Description
     
    ExecutorServiceModule(com.google.common.util.concurrent.ListeningExecutorService userExecutor)
     
    ExecutorServiceModule(com.google.common.util.concurrent.ListeningExecutorService userExecutor, com.google.common.util.concurrent.ListeningExecutorService ioExecutor)
    Deprecated.
    ioExecutor is no longer used.
     
    Deprecated.
    ioExecutor is no longer used.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     

    Methods inherited from class com.google.inject.AbstractModule

    addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestInjection, requestStaticInjection, requireBinding, requireBinding

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExecutorServiceModule

      public ExecutorServiceModule()
    • ExecutorServiceModule

      @Deprecated public ExecutorServiceModule(@Named("jclouds.user-threads") ExecutorService userExecutor, ExecutorService ioExecutor)
      Deprecated.
      ioExecutor is no longer used. This constructor will be removed in jclouds v2. Use ExecutorServiceModule(ExecutorService) instead.
    • ExecutorServiceModule

      @Deprecated public ExecutorServiceModule(@Named("jclouds.user-threads") com.google.common.util.concurrent.ListeningExecutorService userExecutor, com.google.common.util.concurrent.ListeningExecutorService ioExecutor)
      Deprecated.
      ioExecutor is no longer used. This constructor will be removed in jclouds v2. Use ExecutorServiceModule(ListeningExecutorService) instead.
    • ExecutorServiceModule

      public ExecutorServiceModule(@Named("jclouds.user-threads") ExecutorService userExecutor)
    • ExecutorServiceModule

      public ExecutorServiceModule(@Named("jclouds.user-threads") com.google.common.util.concurrent.ListeningExecutorService userExecutor)
  • Method Details

    • configure

      protected void configure()
      Overrides:
      configure in class com.google.inject.AbstractModule