Class RetryMetrics.NoOpRetryMetrics

java.lang.Object
de.cuioss.http.client.retry.RetryMetrics.NoOpRetryMetrics
All Implemented Interfaces:
RetryMetrics
Enclosing interface:
RetryMetrics

public static final class RetryMetrics.NoOpRetryMetrics extends Object implements RetryMetrics
No-op implementation for when metrics are disabled.
  • Method Details

    • recordRetryStart

      public void recordRetryStart(RetryContext context)
      Description copied from interface: RetryMetrics
      Records the start of a complete retry operation. This should be called once per retry operation, before any attempts.
      Specified by:
      recordRetryStart in interface RetryMetrics
      Parameters:
      context - retry context information
    • recordRetryComplete

      public void recordRetryComplete(RetryContext context, Duration totalDuration, boolean successful, int totalAttempts)
      Description copied from interface: RetryMetrics
      Records the completion of a retry operation (success or failure after all attempts).
      Specified by:
      recordRetryComplete in interface RetryMetrics
      Parameters:
      context - retry context information
      totalDuration - total duration including all attempts and delays
      successful - whether the retry operation ultimately succeeded
      totalAttempts - total number of attempts made
    • recordRetryAttempt

      public void recordRetryAttempt(RetryContext context, int attemptNumber, Duration attemptDuration, boolean successful)
      Description copied from interface: RetryMetrics
      Records a single retry attempt.
      Specified by:
      recordRetryAttempt in interface RetryMetrics
      Parameters:
      context - retry context information
      attemptNumber - 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: RetryMetrics
      Records the actual delay time between retry attempts.
      Specified by:
      recordRetryDelay in interface RetryMetrics
      Parameters:
      context - retry context information
      attemptNumber - the attempt number that will follow this delay
      plannedDelay - the calculated delay duration
      actualDelay - the actual delay duration (may differ due to interruption)