Package com.symphony.bdk.core.retry.util
Class BdkExponentialFunction
java.lang.Object
com.symphony.bdk.core.retry.util.BdkExponentialFunction
Custom BdkExponentialFunction class to be used in Bdk Retry mechanism.
The interval between 2 retries will be initiated by the value BdkRetryConfig#initialIntervalMillis.
After each retry, this interval will be multiplied by BdkRetryConfig#multiplier.
This interval will be limited by BdkRetryConfig#maxIntervalMillis, in means that, when this interval
is greater than this value, it will not be multiplied any more and set to BdkRetryConfig#maxIntervalMillis.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.github.resilience4j.core.IntervalFunction
ofExponentialBackoff
(com.symphony.bdk.core.config.model.BdkRetryConfig retryConfig) Produce an interval function from givenBdkRetryConfig
.
-
Constructor Details
-
BdkExponentialFunction
public BdkExponentialFunction()
-
-
Method Details
-
ofExponentialBackoff
public static io.github.resilience4j.core.IntervalFunction ofExponentialBackoff(com.symphony.bdk.core.config.model.BdkRetryConfig retryConfig) Produce an interval function from givenBdkRetryConfig
.- Parameters:
retryConfig
- given retry configuration.- Returns:
- an
IntervalFunction
to be used in Retry mechanism.
-