public class TarantoolClientConfiguratorImpl<SELF extends TarantoolClientConfigurator<SELF>> extends Object implements TarantoolClientConfigurator<SELF>
Modifier and Type | Field and Description |
---|---|
protected Executor |
executor |
protected ProxyOperationsMappingConfig |
mappingConfig |
protected RequestRetryPolicyFactory |
retryPolicyFactory |
Modifier | Constructor and Description |
---|---|
protected |
TarantoolClientConfiguratorImpl() |
|
TarantoolClientConfiguratorImpl(TarantoolClient<TarantoolTuple,TarantoolResult<TarantoolTuple>> client) |
protected RequestRetryPolicyFactory retryPolicyFactory
protected ProxyOperationsMappingConfig mappingConfig
protected Executor executor
public TarantoolClientConfiguratorImpl(TarantoolClient<TarantoolTuple,TarantoolResult<TarantoolTuple>> client)
protected TarantoolClientConfiguratorImpl()
public SELF withProxyMethodMapping()
TarantoolClientConfigurator
withProxyMethodMapping
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
TarantoolClientConfigurator
public SELF withProxyMethodMapping(UnaryOperator<ProxyOperationsMappingConfig.Builder> builder)
TarantoolClientConfigurator
withProxyMethodMapping
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
builder
- builder provider instance, e.g. a lambda function taking the builderTarantoolClientConfigurator
public SELF withRetryingByNumberOfAttempts(int numberOfAttempts)
TarantoolClientConfigurator
withRetryingByNumberOfAttempts
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
numberOfAttempts
- the number of retry attempts for each requestTarantoolClientConfigurator
public SELF withRetryingByNumberOfAttempts(int numberOfAttempts, UnaryOperator<TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<Predicate<Throwable>>> policy)
TarantoolClientConfigurator
withRetryingByNumberOfAttempts
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
numberOfAttempts
- the number of retry attempts for each requestpolicy
- builder provider for TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicy
,
e.g. a lambda function taking the builderTarantoolClientConfigurator
public SELF withRetryingByNumberOfAttempts(int numberOfAttempts, UnaryOperator<TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<Predicate<Throwable>>> policy, Executor executor)
TarantoolClientConfigurator
withRetryingByNumberOfAttempts
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
numberOfAttempts
- the number of retry attempts for each requestpolicy
- builder provider for TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicy
,
e.g. a lambda function taking the builderexecutor
- executor service for retry callbacksTarantoolClientConfigurator
public <T extends Predicate<Throwable>> SELF withRetryingByNumberOfAttempts(int numberOfAttempts, T exceptionsCheck, UnaryOperator<TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<T>> policy)
TarantoolClientConfigurator
withRetryingByNumberOfAttempts
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
T
- callback type for exceptions checknumberOfAttempts
- the number of retry attempts for each requestexceptionsCheck
- function checking whether the given exception may be retriedpolicy
- builder provider for TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicy
,
e.g. a lambda function taking the builderTarantoolClientConfigurator
public <T extends Predicate<Throwable>> SELF withRetryingByNumberOfAttempts(int numberOfAttempts, T exceptionsCheck, UnaryOperator<TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicyFactory.Builder<T>> policy, Executor executor)
TarantoolClientConfigurator
withRetryingByNumberOfAttempts
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
T
- callback type for exceptions checknumberOfAttempts
- the number of retry attempts for each requestexceptionsCheck
- function checking whether the given exception may be retriedpolicy
- builder provider for TarantoolRequestRetryPolicies.AttemptsBoundRetryPolicy
,
e.g. a lambda function taking the builderexecutor
- executor service for retry callbacksTarantoolClientConfigurator
public SELF withRetryingIndefinitely(UnaryOperator<TarantoolRequestRetryPolicies.InfiniteRetryPolicyFactory.Builder<Predicate<Throwable>>> policy, Executor executor)
TarantoolClientConfigurator
withRetryingIndefinitely
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
policy
- builder provider for TarantoolRequestRetryPolicies.InfiniteRetryPolicy
,
e.g. a lambda function taking the builderexecutor
- executor service for retry callbacksTarantoolClientConfigurator
public SELF withRetryingIndefinitely(UnaryOperator<TarantoolRequestRetryPolicies.InfiniteRetryPolicyFactory.Builder<Predicate<Throwable>>> policy)
TarantoolClientConfigurator
withRetryingIndefinitely
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
policy
- builder provider for TarantoolRequestRetryPolicies.InfiniteRetryPolicy
,
e.g. a lambda function taking the builderTarantoolClientConfigurator
public <T extends Predicate<Throwable>> SELF withRetryingIndefinitely(T callback, UnaryOperator<TarantoolRequestRetryPolicies.InfiniteRetryPolicyFactory.Builder<T>> policy)
TarantoolClientConfigurator
withRetryingIndefinitely
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
T
- callback type for exceptions checkcallback
- function checking whether the given exception may be retriedpolicy
- builder provider for TarantoolRequestRetryPolicies.InfiniteRetryPolicy
,
e.g. a lambda function taking the builderTarantoolClientConfigurator
public <T extends Predicate<Throwable>> SELF withRetryingIndefinitely(T callback, UnaryOperator<TarantoolRequestRetryPolicies.InfiniteRetryPolicyFactory.Builder<T>> policy, Executor executor)
TarantoolClientConfigurator
withRetryingIndefinitely
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
T
- callback type for exceptions checkcallback
- function checking whether the given exception may be retriedpolicy
- builder provider for TarantoolRequestRetryPolicies.InfiniteRetryPolicy
,
e.g. a lambda function taking the builderexecutor
- executor service for retry callbacksTarantoolClientConfigurator
public SELF withRetrying(RequestRetryPolicyFactory factory)
TarantoolClientConfigurator
withRetrying
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
factory
- RequestRetryPolicyFactory
TarantoolClientConfigurator
TarantoolRequestRetryPolicies
public SELF withRetrying(RequestRetryPolicyFactory factory, Executor executor)
TarantoolClientConfigurator
withRetrying
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
factory
- RequestRetryPolicyFactory
executor
- executor service for retry callbacksTarantoolClientConfigurator
TarantoolRequestRetryPolicies
public TarantoolClient<TarantoolTuple,TarantoolResult<TarantoolTuple>> build()
TarantoolClientConfigurator
build
in interface TarantoolClientConfigurator<SELF extends TarantoolClientConfigurator<SELF>>
TarantoolClient
protected TarantoolClient<TarantoolTuple,TarantoolResult<TarantoolTuple>> decorate(TarantoolClient<TarantoolTuple,TarantoolResult<TarantoolTuple>> client)
client
- Tarantool client for decoratingTarantoolClientConfigurator
have not been providedCopyright © 2025 Picodata. All rights reserved.