You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to initialize the wait strategy to be a fixed amount of time? As in, all successive exponential wait times are added onto a fixed wait time. For example, the computeSleepTime for the exponential wait strategy which is currently
@Override
public long computeSleepTime(Attempt failedAttempt) {
double exp = Math.pow(2, failedAttempt.getAttemptNumber());
long result = Math.round(multiplier * exp);
if (result > maximumWait) {
result = maximumWait;
}
return result >= 0L ? result : 0L;
}
can return something like initialWait + (result >= 0L ? result : 0L)?
Perhaps this can already be accomplished in another way?
The text was updated successfully, but these errors were encountered:
Ah, interesting. Upon digging, I'm assuming it would also suffice to use the CompositeWaitStrategy as well, with a ExponentialWaitStrategy and FixedWaitStrategy.
It is inconvenient. It is logical to use fixed start time and maximum time. For example, when I have a disconnection issue I want to retry after 5 seconds and exponentially increase every next attempt. Why do I need to calculate time to wait?
Is there a way to initialize the wait strategy to be a fixed amount of time? As in, all successive exponential wait times are added onto a fixed wait time. For example, the
computeSleepTime
for the exponential wait strategy which is currentlycan return something like
initialWait + (result >= 0L ? result : 0L)
?Perhaps this can already be accomplished in another way?
The text was updated successfully, but these errors were encountered: