@Singleton public class DefaultExecutorSelector extends Object implements ExecutorSelector
ExecutorSelector
interface that regards methods that return reactive types as non-blocking.Modifier | Constructor and Description |
---|---|
protected |
DefaultExecutorSelector(ExecutorService ioExecutor)
Construct a default implementation for the given executor service for asynchronous IO tasks.
|
Modifier and Type | Method and Description |
---|---|
Optional<ExecutorService> |
select(MethodReference method)
Select an
ExecutorService for the given MethodReference . |
protected DefaultExecutorSelector(@Named(value="io") ExecutorService ioExecutor)
ioExecutor
- A service that provide method to manager termination and produce future for tracking
progress of one or more asynchronous IO tasks.public Optional<ExecutorService> select(MethodReference method)
ExecutorSelector
ExecutorService
for the given MethodReference
.select
in interface ExecutorSelector
method
- The MethodReference
ExecutorService
. If an ExecutorService
cannot be established
Optional.empty()
is returned