public class CompletionStageTimeout<V> extends Timeout<CompletionStage<V>>
Timeout.MetricsRecorder| Constructor and Description |
|---|
CompletionStageTimeout(FaultToleranceStrategy<CompletionStage<V>> delegate,
String description,
long timeoutInMillis,
TimeoutWatcher watcher,
ExecutorService originalExecutor,
Timeout.MetricsRecorder metricsRecorder) |
| Modifier and Type | Method and Description |
|---|---|
CompletionStage<V> |
apply(InvocationContext<CompletionStage<V>> ctx)
Apply the fault tolerance strategy around the target
Callable. |
public CompletionStageTimeout(FaultToleranceStrategy<CompletionStage<V>> delegate, String description, long timeoutInMillis, TimeoutWatcher watcher, ExecutorService originalExecutor, Timeout.MetricsRecorder metricsRecorder)
public CompletionStage<V> apply(InvocationContext<CompletionStage<V>> ctx)
FaultToleranceStrategyCallable.
The Callable is wrapped in an InvocationContext.apply in interface FaultToleranceStrategy<CompletionStage<V>>apply in class Timeout<CompletionStage<V>>ctx - the InvocationContext wrapping the Callable guarded by this fault tolerance strategyCallableCopyright © 2018–2020. All rights reserved.