T - exception checking predicate typepublic static final class TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory<T extends Predicate<Throwable>> extends Object implements RequestRetryPolicyFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<T extends Predicate<Throwable>>
|
| Constructor and Description |
|---|
AttemptsBoundRetryPolicyFactory(int numberOfAttempts,
long requestTimeout,
long delay,
T exceptionCheck)
Basic constructor with timeout and delay
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends Predicate<Throwable>> |
builder(int attempts,
T exceptionCheck)
Create a builder for this factory
|
RequestRetryPolicy |
create()
Instantiate a new request retry policy instance.
|
long |
getDelay()
Getter for delay
|
T |
getExceptionCheck()
Getter for exception handler
|
int |
getNumberOfAttempts()
Getter for number of attempts
|
long |
getRequestTimeout()
Getter for request timeout
|
public AttemptsBoundRetryPolicyFactory(int numberOfAttempts,
long requestTimeout,
long delay,
T exceptionCheck)
numberOfAttempts - maximum number of retry attemptsrequestTimeout - timeout for one retry attempt, in millisecondsdelay - delay between retry attempts, in millisecondsexceptionCheck - predicate checking whether the given exception may be retriedpublic static <T extends Predicate<Throwable>> TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<T> builder(int attempts, T exceptionCheck)
T - exception checking predicate typeattempts - maximum number of attemptsexceptionCheck - function checking whether the given exception may be retriedpublic RequestRetryPolicy create()
RequestRetryPolicyFactorycreate in interface RequestRetryPolicyFactorypublic int getNumberOfAttempts()
public T getExceptionCheck()
public long getDelay()
public long getRequestTimeout()
Copyright © 2025 Picodata. All rights reserved.