Package io.tarantool.driver.api.retry
Class TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<T extends Predicate<Throwable>>
- java.lang.Object
-
- io.tarantool.driver.api.retry.TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<T>
-
- Type Parameters:
T
- exception checking predicate type
- Enclosing class:
- TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory<T extends Predicate<Throwable>>
public static class TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<T extends Predicate<Throwable>> extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory<T>
build()
Create new factory instanceTarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<T>
withDelay(long delay)
Set delay between attemptsTarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<T>
withRequestTimeout(long requestTimeout)
Set timeout for each attempt
-
-
-
Constructor Detail
-
Builder
public Builder(int numberOfAttempts, T exceptionCheck)
Basic constructor- Parameters:
numberOfAttempts
- maximum number of retry attemptsexceptionCheck
- predicate checking whether the given exception may be retried
-
-
Method Detail
-
withRequestTimeout
public TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<T> withRequestTimeout(long requestTimeout)
Set timeout for each attempt- Parameters:
requestTimeout
- task timeout, in milliseconds- Returns:
- this builder instance
-
withDelay
public TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<T> withDelay(long delay)
Set delay between attempts- Parameters:
delay
- task delay, in milliseconds- Returns:
- this builder instance
-
build
public TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory<T> build()
Create new factory instance- Returns:
- new factory instance
-
-