public class SubmitterExecutorAdapter extends AbstractSubmitterExecutor
Executor
implementations to provide
SubmitterExecutor
capabilities.
In addition this implementation returns ListenableFuture
future implementations, making it an easy way to convert your favorite executor to use
ListenableFutures.
Constructor and Description |
---|
SubmitterExecutorAdapter(java.util.concurrent.Executor executor)
Constructors a new wrapper instance with the provided executor to defer calls to.
|
Modifier and Type | Method and Description |
---|---|
static SubmitterExecutor |
adaptExecutor(java.util.concurrent.Executor executor)
Ensures the provided
Executor is of type SubmitterExecutor , adapting it with
this class if necessary to provide the interface. |
execute, submit, submit
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
submit
public SubmitterExecutorAdapter(java.util.concurrent.Executor executor)
executor
- Executor
instance.public static SubmitterExecutor adaptExecutor(java.util.concurrent.Executor executor)
Executor
is of type SubmitterExecutor
, adapting it with
this class if necessary to provide the interface.executor
- Executor to test type or wrap if necessarySubmitterExecutor