Class FutureExecution<V>
java.lang.Object
io.smallrye.faulttolerance.core.async.FutureExecution<V>
- All Implemented Interfaces:
FaultToleranceStrategy<Future<V>>
Unlike
ThreadOffload, this is supposed to be the first strategy
in the chain. The remaining strategies are executed on an extra thread. This allows using
synchronous execution of other strategies to implement Future-based
@Asynchronous invocations, with two exceptions:
- timeouts, where
FutureTimeoutis needed in front ofTimeout; - bulkheads, where
FutureBulkheadis used instead ofBulkhead.
-
Constructor Summary
ConstructorsConstructorDescriptionFutureExecution(FaultToleranceStrategy<Future<V>> delegate, Executor executor) -
Method Summary
-
Constructor Details
-
FutureExecution
-
-
Method Details
-
apply
Description copied from interface:FaultToleranceStrategyApply the fault tolerance strategy around the targetCallable. TheCallableis wrapped in anFaultToleranceContext.- Specified by:
applyin interfaceFaultToleranceStrategy<V>- Parameters:
ctx- theInvocationContextwrapping theCallableguarded by this fault tolerance strategy- Returns:
- result computed by the target
Callable
-