public class RetryUntilElapsed extends ExponentialBackoffRetry
| Constructor and Description |
|---|
RetryUntilElapsed(long maxElapsedMs,
long backoffMs,
int backoffCeiling) |
| Modifier and Type | Method and Description |
|---|---|
long |
getMaxElapsedMillis()
Return maximal count of elapsed milliseconds
|
long |
nextRetryMs(int retryCount,
long elapsedTimeMs)
Called when an operation is failed for some reason to determine if it should be retried.
|
RetryUntilElapsed |
withBackoffCeiling(int ceiling)
Create new retry policy with specified backoff ceiling
|
RetryUntilElapsed |
withBackoffMs(long ms)
Create new retry policy with specified backoff duration
|
RetryUntilElapsed |
withMaxElapsedMs(long maxElapsedMs)
Create new retry policy with specified count of elapsed milliseconds
|
backoffTimeMillis, getBackoffCeiling, getBackoffMillispublic RetryUntilElapsed(long maxElapsedMs,
long backoffMs,
int backoffCeiling)
public long nextRetryMs(int retryCount,
long elapsedTimeMs)
RetryPolicyretryCount - the number of times retried so far (0 the first time)elapsedTimeMs - the elapsed time in ms since the operation was attemptedpublic long getMaxElapsedMillis()
public RetryUntilElapsed withMaxElapsedMs(long maxElapsedMs)
maxElapsedMs - new value of max elapsed millisecondspublic RetryUntilElapsed withBackoffMs(long ms)
ms - new backoff durationpublic RetryUntilElapsed withBackoffCeiling(int ceiling)
ceiling - new backoff ceilingCopyright © 2024. All rights reserved.