/** * Executes the work with a specified number of retries with a exponentially increasing number of milliseconds * between each retry. * * @param exceptionsToRetryOn For a retry to happen, it must be in this set of accepted exceptions. If an * exception raises that is not in the set, then an error is immediately raised * with no retry. */ public T exponentialBackoff(final int retries, final long initialDelay, final Set<Class> exceptionsToRetryOn) { return use(new TransactionRetryStrategy.ExponentialBackoff<T>( retries, initialDelay, exceptionsToRetryOn)); }
/** * Executes the work with a specified number of retries with a exponentially increasing number of milliseconds * between each retry. */ public T exponentialBackoff(final int retries) { return use(new TransactionRetryStrategy.ExponentialBackoff<T>( retries, TransactionRetryStrategy.ExponentialBackoff.DEFAULT_DELAY_MS)); }
/** * Executes the work with a default number of retries with a exponentially increasing number of milliseconds * between each retry. */ public T exponentialBackoff() { return use(new TransactionRetryStrategy.ExponentialBackoff<T>()); }
/** * Executes the work with a specified number of retries with a exponentially increasing number of milliseconds * between each retry. */ public T exponentialBackoff(final int retries, final long initialDelay) { return use(new TransactionRetryStrategy.ExponentialBackoff<T>( retries, initialDelay)); }