Class Timeout<V>
java.lang.Object
io.smallrye.faulttolerance.core.timeout.Timeout<V>
- All Implemented Interfaces:
FaultToleranceStrategy<V>
- Direct Known Subclasses:
CompletionStageTimeout
-
Constructor Summary
ConstructorsConstructorDescriptionTimeout(FaultToleranceStrategy<V> delegate, String description, long timeoutInMillis, Timer timer) -
Method Summary
Modifier and TypeMethodDescriptionapply(InvocationContext<V> ctx) Apply the fault tolerance strategy around the targetCallable.
-
Constructor Details
-
Timeout
public Timeout(FaultToleranceStrategy<V> delegate, String description, long timeoutInMillis, Timer timer)
-
-
Method Details
-
apply
Description copied from interface:FaultToleranceStrategyApply the fault tolerance strategy around the targetCallable. TheCallableis wrapped in anInvocationContext.- Specified by:
applyin interfaceFaultToleranceStrategy<V>- Parameters:
ctx- theInvocationContextwrapping theCallableguarded by this fault tolerance strategy- Returns:
- result computed by the target
Callable - Throws:
Exception- if result couldn't be computed
-