Class FutureTimeout<V>
java.lang.Object
io.smallrye.faulttolerance.core.timeout.FutureTimeout<V>
- All Implemented Interfaces:
FaultToleranceStrategy<Future<V>>
The next strategy in the chain must be
Timeout, and it is invoked on an extra thread.
Communication then happens using FutureTimeoutNotification.
Note that the TimeoutException emitted by this strategy might come from two places:
the Timeout strategy or FutureTimeoutNotification. Both might happen,
and whichever happens first gets to decide.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FutureTimeout
-
-
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
-