Class CompletionStageExecution<V>
- java.lang.Object
-
- io.smallrye.faulttolerance.core.async.CompletionStageExecution<V>
-
- All Implemented Interfaces:
FaultToleranceStrategy<CompletionStage<V>>
public class CompletionStageExecution<V> extends Object implements FaultToleranceStrategy<CompletionStage<V>>
UnlikeFutureExecution, this is supposed to be the next to last strategy in the chain (last beingInvocation). To implementCompletionStage-based@Asynchronousinvocations, each synchronous strategy has aCompletionStagecounterpart that is used. TheCompletionStagestrategies never block and hence may be executed on the original thread.
-
-
Constructor Summary
Constructors Constructor Description CompletionStageExecution(FaultToleranceStrategy<CompletionStage<V>> delegate, Executor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<V>apply(InvocationContext<CompletionStage<V>> ctx)Apply the fault tolerance strategy around the targetCallable.
-
-
-
Constructor Detail
-
CompletionStageExecution
public CompletionStageExecution(FaultToleranceStrategy<CompletionStage<V>> delegate, Executor executor)
-
-
Method Detail
-
apply
public CompletionStage<V> apply(InvocationContext<CompletionStage<V>> ctx)
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
-
-