Class RetryDecision
java.lang.Object
software.amazon.lambda.durable.retry.RetryDecision
Represents a decision about whether to retry a failed operation and how long to wait.
-
Method Summary
Modifier and TypeMethodDescriptiondelay()static RetryDecisionfail()Creates a retry decision indicating the operation should not be retried.static RetryDecisionCreates a retry decision indicating the operation should be retried after the specified delay.booleantoString()
-
Method Details
-
retry
Creates a retry decision indicating the operation should be retried after the specified delay.- Parameters:
delay- the duration to wait before retrying- Returns:
- a RetryDecision indicating retry with the specified delay
-
fail
Creates a retry decision indicating the operation should not be retried.- Returns:
- a RetryDecision indicating no retry should be attempted
-
shouldRetry
public boolean shouldRetry()- Returns:
- true if the operation should be retried, false otherwise
-
delay
- Returns:
- the duration to wait before retrying, or Duration.ZERO if no retry
-
toString
-