- All Superinterfaces:
public interface RetryStrategy extends Serializable
The lifecycle of a retry strategy begins whenever an action fails and ends in one of two ways: either a retry of the action is successful (for example reconnection attempt to a server succeeds) or the strategy gives up (for example it did a specified maximum number of retries, all of them failed).
int getMaxAttempts()Maximum number of retry attempt that should be made before giving up.
A value of 0 should be interpreted as "never retry". Action is performed once.
A negative value is interpreted as "retry indefinitely, until success".
IntervalFunction getIntervalFunction()Function specifying how much time to wait before each retry attempt. Can specify a constant wait time, exponential backoff or any other, arbitrarily complex wait strategy.