public interface ExecutorSelector
ExecutorService
to run an operation on.Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.util.concurrent.ExecutorService> |
select(MethodReference method,
ThreadSelection threadSelection)
Select an
ExecutorService for the given MethodReference . |
java.util.Optional<java.util.concurrent.ExecutorService> |
select(java.lang.String name)
Obtain executor for the given name.
|
java.util.Optional<java.util.concurrent.ExecutorService> select(MethodReference method, ThreadSelection threadSelection)
ExecutorService
for the given MethodReference
.method
- The MethodReference
threadSelection
- The thread selection modeExecutorService
. If an ExecutorService
cannot be established
Optional.empty()
is returnedjava.util.Optional<java.util.concurrent.ExecutorService> select(java.lang.String name)
name
- The name of the executor