Class RetryContext
java.lang.Object
com.northconcepts.datapipeline.retry.RetryContext
Describes a failed attempt of a
RetryingOperation; passed to its retry predicate to decide whether to retry.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the total number of failures the operation has seen, including those of earlier calls.intReturns the 0-based index of the failed attempt (0 for the initial attempt, 1 for the first retry).setExceptionCount(long exceptionCount) Sets the total number of failures the operation has seen, including those of earlier calls.setLastException(Throwable lastException) setRetryCount(int retryCount) Sets the 0-based index of the failed attempt (0 for the initial attempt, 1 for the first 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
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
Sets the total number of failures the operation has seen, including those of earlier calls. -
getLastException
-
setLastException
-