public class ExecutorServiceModule
extends com.google.inject.AbstractModule
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 and Description |
---|
ExecutorServiceModule() |
ExecutorServiceModule(ExecutorService userExecutor) |
ExecutorServiceModule(ExecutorService userExecutor,
ExecutorService ioExecutor)
Deprecated.
ioExecutor is no longer used. This constructor will be removed in jclouds v2.
Use ExecutorServiceModule(ExecutorService) instead. |
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. This constructor will be removed in jclouds v2.
Use ExecutorServiceModule(ListeningExecutorService) instead. |
Modifier and Type | Method and Description |
---|---|
protected void |
configure() |
static com.google.common.util.concurrent.SimpleTimeLimiter |
createSimpleTimeLimiter(ExecutorService executorService)
Reflective creation of SimpleTimeLimiter to allow compatibility with Guava 23.0.
|
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
public ExecutorServiceModule()
@Deprecated public ExecutorServiceModule(@Named(value="jclouds.user-threads") ExecutorService userExecutor, ExecutorService ioExecutor)
ioExecutor
is no longer used. This constructor will be removed in jclouds v2.
Use ExecutorServiceModule(ExecutorService)
instead.@Deprecated public ExecutorServiceModule(@Named(value="jclouds.user-threads") com.google.common.util.concurrent.ListeningExecutorService userExecutor, com.google.common.util.concurrent.ListeningExecutorService ioExecutor)
ioExecutor
is no longer used. This constructor will be removed in jclouds v2.
Use ExecutorServiceModule(ListeningExecutorService)
instead.public ExecutorServiceModule(@Named(value="jclouds.user-threads") ExecutorService userExecutor)
public ExecutorServiceModule(@Named(value="jclouds.user-threads") com.google.common.util.concurrent.ListeningExecutorService userExecutor)
public static com.google.common.util.concurrent.SimpleTimeLimiter createSimpleTimeLimiter(ExecutorService executorService)
executorService
- the execution service to use when running time-limited tasksprotected void configure()
configure
in class com.google.inject.AbstractModule
Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.