public final class TarantoolRequestRetryPolicies extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicy<T extends Predicate<Throwable>>
Retry policy that accepts a maximum number of attempts and an exception checking predicate.
|
static class |
TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory<T extends Predicate<Throwable>>
|
static class |
TarantoolRequestRetryPolicies.InfiniteRetryPolicy<T extends Predicate<Throwable>>
Retry policy that performs unbounded number of attempts.
|
static class |
TarantoolRequestRetryPolicies.InfiniteRetryPolicyFactory<T extends Predicate<Throwable>>
|
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_ONE_HOUR_TIMEOUT |
static Predicate<Throwable> |
retryAll |
static Predicate<Throwable> |
retryNone |
Modifier and Type | Method and Description |
---|---|
static TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<Predicate<Throwable>> |
byNumberOfAttempts(int numberOfAttempts)
Create a factory for retry policy bound by retry attempts.
|
static <T extends Predicate<Throwable>> |
byNumberOfAttempts(int numberOfAttempts,
T exceptionCheck)
Create a factory for retry policy bound by retry attempts
|
static ScheduledExecutorService |
getTimeoutScheduler()
Get timeout scheduler instance.
|
static Predicate<Throwable> |
retryNetworkErrors()
Check all known network exceptions
|
static Predicate<Throwable> |
retryTarantoolNoSuchProcedureErrors()
|
static <T extends Predicate<Throwable>> |
unbound()
Create a factory for retry policy with unbounded number of attempts.
|
static <T extends Predicate<Throwable>> |
unbound(T exceptionCheck)
Create a factory for retry policy with unbounded number of attempts
|
public static Predicate<Throwable> retryNetworkErrors()
public static Predicate<Throwable> retryTarantoolNoSuchProcedureErrors()
TarantoolNoSuchProcedureException
public static TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<Predicate<Throwable>> byNumberOfAttempts(int numberOfAttempts)
numberOfAttempts
- maximum number of retries, zero value means no retriespublic static <T extends Predicate<Throwable>> TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<T> byNumberOfAttempts(int numberOfAttempts, T exceptionCheck)
T
- exception checking predicate typenumberOfAttempts
- maximum number of retries, zero value means no retriesexceptionCheck
- predicate, checking the given exception whether the request may be retriedpublic static <T extends Predicate<Throwable>> TarantoolRequestRetryPolicies.InfiniteRetryPolicyFactory.Builder<T> unbound()
retryNetworkErrors()
is used for checking exceptions by default.T
- exception checking predicate typepublic static <T extends Predicate<Throwable>> TarantoolRequestRetryPolicies.InfiniteRetryPolicyFactory.Builder<T> unbound(T exceptionCheck)
T
- exception checking predicate typeexceptionCheck
- predicate, checking the given exception whether the request may be retriedpublic static ScheduledExecutorService getTimeoutScheduler()
Copyright © 2025 Picodata. All rights reserved.