Class RetryContext

java.lang.Object
com.northconcepts.datapipeline.retry.RetryContext

public final class RetryContext extends Object
Describes a failed attempt of a RetryingOperation; passed to its retry predicate to decide whether to retry.
  • Constructor Details

    • RetryContext

      public RetryContext()
  • Method Details

    • getRetryCount

      public int getRetryCount()
      Returns the 0-based index of the failed attempt (0 for the initial attempt, 1 for the first retry).
    • setRetryCount

      public RetryContext setRetryCount(int retryCount)
      Sets the 0-based index of the failed attempt (0 for the initial attempt, 1 for the first retry).
    • getExceptionCount

      public long getExceptionCount()
      Returns the total number of failures the operation has seen, including those of earlier calls.
    • setExceptionCount

      public RetryContext setExceptionCount(long exceptionCount)
      Sets the total number of failures the operation has seen, including those of earlier calls.
    • getLastException

      public Throwable getLastException()
    • setLastException

      public RetryContext setLastException(Throwable lastException)