Package tech.ydb.yoj.util.retry
Class ExponentialBackoffRetryPolicy
java.lang.Object
tech.ydb.yoj.util.retry.ExponentialBackoffRetryPolicy
- All Implemented Interfaces:
RetryPolicy
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExponentialBackoffRetryPolicy(long initial, long max, double jitter, double multiplier) -
Method Summary
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
ExponentialBackoffRetryPolicy
@ConstructorProperties({"initial","max","jitter","multiplier"}) public ExponentialBackoffRetryPolicy(long initial, long max, double jitter, double multiplier)
-
-
Method Details
-
calcDuration
- Specified by:
calcDurationin interfaceRetryPolicy- Parameters:
attempt- failed attempt number, counting from 1- Returns:
- recommended retry interval
-
isSameAs
- Specified by:
isSameAsin interfaceRetryPolicy
-