java.lang.Object
de.cuioss.http.client.retry.RetryMetrics.NoOpRetryMetrics
- All Implemented Interfaces:
RetryMetrics
- Enclosing interface:
RetryMetrics
No-op implementation for when metrics are disabled.
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.cuioss.http.client.retry.RetryMetrics
RetryMetrics.NoOpRetryMetrics -
Method Summary
Modifier and TypeMethodDescriptionvoidrecordRetryAttempt(RetryContext context, int attemptNumber, Duration attemptDuration, boolean successful) Records a single retry attempt.voidrecordRetryComplete(RetryContext context, Duration totalDuration, boolean successful, int totalAttempts) Records the completion of a retry operation (success or failure after all attempts).voidrecordRetryDelay(RetryContext context, int attemptNumber, Duration plannedDelay, Duration actualDelay) Records the actual delay time between retry attempts.voidrecordRetryStart(RetryContext context) Records the start of a complete retry operation.
-
Method Details
-
recordRetryStart
Description copied from interface:RetryMetricsRecords the start of a complete retry operation. This should be called once per retry operation, before any attempts.- Specified by:
recordRetryStartin interfaceRetryMetrics- Parameters:
context- retry context information
-
recordRetryComplete
public void recordRetryComplete(RetryContext context, Duration totalDuration, boolean successful, int totalAttempts) Description copied from interface:RetryMetricsRecords the completion of a retry operation (success or failure after all attempts).- Specified by:
recordRetryCompletein interfaceRetryMetrics- Parameters:
context- retry context informationtotalDuration- total duration including all attempts and delayssuccessful- whether the retry operation ultimately succeededtotalAttempts- total number of attempts made
-
recordRetryAttempt
public void recordRetryAttempt(RetryContext context, int attemptNumber, Duration attemptDuration, boolean successful) Description copied from interface:RetryMetricsRecords a single retry attempt.- Specified by:
recordRetryAttemptin interfaceRetryMetrics- Parameters:
context- retry context informationattemptNumber- the attempt number (1-based)attemptDuration- duration of this specific attempt (excluding delay)successful- whether this specific attempt succeeded
-
recordRetryDelay
public void recordRetryDelay(RetryContext context, int attemptNumber, Duration plannedDelay, Duration actualDelay) Description copied from interface:RetryMetricsRecords the actual delay time between retry attempts.- Specified by:
recordRetryDelayin interfaceRetryMetrics- Parameters:
context- retry context informationattemptNumber- the attempt number that will follow this delayplannedDelay- the calculated delay durationactualDelay- the actual delay duration (may differ due to interruption)
-