Class 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 Detail

      • ExecutorServiceModule

        public ExecutorServiceModule()
      • 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 Detail

      • configure

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