Class MetricsCollector<V>
java.lang.Object
io.smallrye.faulttolerance.core.metrics.MetricsCollector<V>
- All Implemented Interfaces:
FaultToleranceStrategy<V>
- Direct Known Subclasses:
CompletionStageMetricsCollector
-
Constructor Summary
ConstructorsConstructorDescriptionMetricsCollector(FaultToleranceStrategy<V> delegate, MetricsRecorder metrics, MeteredOperation operation) -
Method Summary
Modifier and TypeMethodDescriptionapply(InvocationContext<V> ctx) Apply the fault tolerance strategy around the targetCallable.protected final void
-
Constructor Details
-
MetricsCollector
public MetricsCollector(FaultToleranceStrategy<V> delegate, MetricsRecorder metrics, MeteredOperation operation)
-
-
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
-
registerMetrics
-