@Override public RetryAction shouldRetry(Exception e, int retries, int failovers, boolean isIdempotentOrAtMostOnce) throws Exception { if (retries >= maxRetries) { return new RetryAction(RetryAction.RetryDecision.FAIL, 0 , getReason()); } return new RetryAction(RetryAction.RetryDecision.RETRY, timeUnit.toMillis(calculateSleepTime(retries)), getReason()); }
@Override public int hashCode() { return toString().hashCode(); }
protected String getReason() { return constructReasonString(maxRetries); }
@Override public int hashCode() { return toString().hashCode(); }
@Override public int hashCode() { return toString().hashCode(); }
@Override public int hashCode() { return toString().hashCode(); }
public boolean shouldRetry(Exception e, int retries) throws Exception { if (retries >= maxRetries) { throw e; } try { timeUnit.sleep(calculateSleepTime(retries)); } catch (InterruptedException ie) { // retry } return true; }
public boolean shouldRetry(Exception e, int retries) throws Exception { if (retries >= maxRetries) { throw e; } try { timeUnit.sleep(calculateSleepTime(retries)); } catch (InterruptedException ie) { // retry } return true; }
@Override public RetryAction shouldRetry(Exception e, int retries, int failovers, boolean isIdempotentOrAtMostOnce) throws Exception { if (retries >= maxRetries) { return RetryAction.FAIL; } return new RetryAction(RetryAction.RetryDecision.RETRY, timeUnit.toMillis(calculateSleepTime(retries))); }
@Override public int hashCode() { return toString().hashCode(); }
@Override public boolean equals(final Object that) { if (this == that) { return true; } else if (that == null || this.getClass() != that.getClass()) { return false; } return this.toString().equals(that.toString()); }
@Override public boolean equals(final Object that) { if (this == that) { return true; } else if (that == null || this.getClass() != that.getClass()) { return false; } return this.toString().equals(that.toString()); }
@Override public RetryAction shouldRetry(Exception e, int retries, int failovers, boolean isIdempotentOrAtMostOnce) throws Exception { if (retries >= maxRetries) { return RetryAction.FAIL; } return new RetryAction(RetryAction.RetryDecision.RETRY, timeUnit.toMillis(calculateSleepTime(retries))); }
@Override public boolean equals(final Object that) { if (this == that) { return true; } else if (that == null || this.getClass() != that.getClass()) { return false; } return this.toString().equals(that.toString()); }
@Override public RetryAction shouldRetry(Exception e, int retries, int failovers, boolean isIdempotentOrAtMostOnce) throws Exception { if (retries >= maxRetries) { return RetryAction.FAIL; } return new RetryAction(RetryAction.RetryDecision.RETRY, timeUnit.toMillis(calculateSleepTime(retries))); }
@Override public boolean equals(final Object that) { if (this == that) { return true; } else if (that == null || this.getClass() != that.getClass()) { return false; } return this.toString().equals(that.toString()); }
@Override public RetryAction shouldRetry(Exception e, int retries, int failovers, boolean isIdempotentOrAtMostOnce) throws Exception { if (retries >= maxRetries) { return new RetryAction(RetryAction.RetryDecision.FAIL, 0 , getReason()); } return new RetryAction(RetryAction.RetryDecision.RETRY, timeUnit.toMillis(calculateSleepTime(retries)), getReason()); }
protected String getReason() { return constructReasonString(maxRetries); }
@Override public boolean equals(final Object that) { if (this == that) { return true; } else if (that == null || this.getClass() != that.getClass()) { return false; } return this.toString().equals(that.toString()); }