public void imposeBackoffExponentialDelay(long period, int pow, int failureCount, int max, String commandDescription) { imposeBackoffExponentialDelay(period, period * 10l, pow, failureCount, max, commandDescription); }
public void imposeBackoffExponentialDelay(long period, int pow, int failureCount, int max, String commandDescription) { imposeBackoffExponentialDelay(period, period * 10L, pow, failureCount, max, commandDescription); }
private void backoffForAttempt(int retryAttempt, String message) { backoffLimitedRetryHandler.imposeBackoffExponentialDelay(200L, 2, retryAttempt, sshRetries, message); }
private void backoffForAttempt(int retryAttempt, String message) { backoffLimitedRetryHandler.imposeBackoffExponentialDelay(200L, 2, retryAttempt, sshRetries, message); }
public void imposeBackoffExponentialDelay(int failureCount, String commandDescription) { imposeBackoffExponentialDelay(delayStart, 2, failureCount, retryCountLimit, commandDescription); }
public void imposeBackoffExponentialDelay(long period, int pow, int failureCount, int max, String commandDescription) { imposeBackoffExponentialDelay(period, period * 10l, pow, failureCount, max, commandDescription); }
public void imposeBackoffExponentialDelay(long period, int pow, int failureCount, int max, String commandDescription) { imposeBackoffExponentialDelay(period, period * 10l, pow, failureCount, max, commandDescription); }
public void imposeBackoffExponentialDelay(int failureCount, String commandDescription) { imposeBackoffExponentialDelay(delayStart, 2, failureCount, retryCountLimit, commandDescription); }
private void backoffForAttempt(int retryAttempt, String message) { backoffLimitedRetryHandler.imposeBackoffExponentialDelay(200L, 2, retryAttempt, sshRetries, message); }
private void backoffForAttempt(int retryAttempt, String message) { backoffLimitedRetryHandler.imposeBackoffExponentialDelay(200L, 2, retryAttempt, sshRetries, message); }
public void imposeBackoffExponentialDelay(int failureCount, String commandDescription) { imposeBackoffExponentialDelay(delayStart, 2, failureCount, retryCountLimit, commandDescription); }
public void imposeBackoffExponentialDelay(int failureCount, String commandDescription) { imposeBackoffExponentialDelay(delayStart, 2, failureCount, retryCountLimit, commandDescription); }
public void imposeBackoffExponentialDelay(int failureCount, String commandDescription) { imposeBackoffExponentialDelay(delayStart, 2, failureCount, retryCountLimit, commandDescription); }
public void imposeBackoffExponentialDelay(int failureCount, String commandDescription) { imposeBackoffExponentialDelay(delayStart, 2, failureCount, retryCountLimit, commandDescription); }
@Test(enabled = false) void testExponentialBackoffDelaySmallInterval5() throws InterruptedException { long period = 5; long acceptableDelay = period - 1; long startTime = System.nanoTime(); handler.imposeBackoffExponentialDelay(period, 2, 1, 5, "TEST FAILURE: 1"); long elapsedTime = (System.nanoTime() - startTime) / 1000000; assertThat(elapsedTime).isBetween(period, period + acceptableDelay); }
@Test(enabled = false) void testExponentialBackoffDelaySmallInterval1() throws InterruptedException { long period = 1; long acceptableDelay = 5; long startTime = System.nanoTime(); handler.imposeBackoffExponentialDelay(period, 2, 1, 5, "TEST FAILURE: 1"); long elapsedTime = (System.nanoTime() - startTime) / 1000000; assertThat(elapsedTime).isBetween(period, period + acceptableDelay); }
@Test void testExponentialBackoffDelaySmallInterval0() throws InterruptedException { long period = 0; long acceptableDelay = 5; long startTime = System.nanoTime(); handler.imposeBackoffExponentialDelay(period, 2, 1, 5, "TEST FAILURE: 1"); long elapsedTime = (System.nanoTime() - startTime) / 1000000; assertThat(elapsedTime).isBetween(period, period + acceptableDelay); }
private boolean ifReplayableBackoffAndReturnTrue(HttpCommand command) { command.incrementFailureCount(); if (!command.isReplayable()) { logger.error("Cannot retry after server error, command is not replayable: %1$s", command); return false; } else if (command.getFailureCount() > retryCountLimit) { logger.error("Cannot retry after server error, command has exceeded retry limit %1$d: %2$s", retryCountLimit, command); return false; } else { imposeBackoffExponentialDelay(command.getFailureCount(), "server error: " + command.toString()); return true; } }
private boolean ifReplayableBackoffAndReturnTrue(HttpCommand command) { command.incrementFailureCount(); if (!command.isReplayable()) { logger.error("Cannot retry after server error, command is not replayable: %1$s", command); return false; } else if (command.getFailureCount() > retryCountLimit) { logger.error("Cannot retry after server error, command has exceeded retry limit %1$d: %2$s", retryCountLimit, command); return false; } else { imposeBackoffExponentialDelay(command.getFailureCount(), "server error: " + command.toString()); return true; } }
private boolean ifReplayableBackoffAndReturnTrue(HttpCommand command) { command.incrementFailureCount(); if (!command.isReplayable()) { logger.error("Cannot retry after server error, command is not replayable: %1$s", command); return false; } else if (command.getFailureCount() > retryCountLimit) { logger.error("Cannot retry after server error, command has exceeded retry limit %1$d: %2$s", retryCountLimit, command); return false; } else { imposeBackoffExponentialDelay(command.getFailureCount(), "server error: " + command.toString()); return true; } }