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>>
Unlike
FutureExecution, this is supposed to be the next to last strategy
in the chain (last being Invocation). To implement CompletionStage-based
@Asynchronous invocations, each synchronous strategy has a CompletionStage
counterpart that is used. The CompletionStage strategies never block and hence
may be executed on the original thread.-
Constructor Summary
ConstructorsConstructorDescriptionCompletionStageExecution(FaultToleranceStrategy<CompletionStage<V>> delegate, Executor executor) -
Method Summary
Modifier and TypeMethodDescriptionapply(InvocationContext<CompletionStage<V>> ctx) Apply the fault tolerance strategy around the targetCallable.
-
Constructor Details
-
CompletionStageExecution
public CompletionStageExecution(FaultToleranceStrategy<CompletionStage<V>> delegate, Executor executor)
-
-
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
-