public interface TarantoolClientBuilder extends TarantoolClientConfigurator<TarantoolClientBuilder>
Provides a single entry point for building all types of Tarantool clients.
| Modifier and Type | Method and Description |
|---|---|
TarantoolClient<TarantoolTuple,TarantoolResult<TarantoolTuple>> |
build()
Build the configured Tarantool client instance.
|
TarantoolClientBuilder |
withAddress(InetSocketAddress socketAddress)
Specify a Tarantool server address.
|
TarantoolClientBuilder |
withAddress(String host)
Specify a single host of a Tarantool server.
|
TarantoolClientBuilder |
withAddress(String host,
int port)
Specify a single host and a port of a Tarantool server.
|
TarantoolClientBuilder |
withAddresses(List<TarantoolServerAddress> addressList)
Specify a list of Tarantool server addresses.
|
TarantoolClientBuilder |
withAddresses(TarantoolServerAddress... address)
Specify one or more Tarantool server addresses.
|
TarantoolClientBuilder |
withAddressProvider(TarantoolClusterAddressProvider addressProvider)
Specify a provider for Tarantool server addresses.
|
TarantoolClientBuilder |
withAuthMechanism(AuthMechanism authMechanism)
Specify authentication mechanism configured on the server.
|
TarantoolClientBuilder |
withConnections(int connections)
Specify the number of connections per one Tarantool server.
|
TarantoolClientBuilder |
withConnectionSelectionStrategy(ConnectionSelectionStrategyFactory connectionSelectionStrategyFactory)
Specify a custom connection selection strategy factory.
|
TarantoolClientBuilder |
withConnectionSelectionStrategy(TarantoolConnectionSelectionStrategyType connectionSelectionStrategyType)
Select a built-in connection selection strategy factory.
|
TarantoolClientBuilder |
withConnectTimeout(int connectTimeout)
Specify a connection timeout.
|
TarantoolClientBuilder |
withCredentials(String user,
String password)
Specify user credentials for password-based authentication in a Tarantool server.
|
TarantoolClientBuilder |
withCredentials(TarantoolCredentials tarantoolCredentials)
Specify user credentials for authentication in a Tarantool server.
|
TarantoolClientBuilder |
withDefaultMessagePackMapperConfiguration(UnaryOperator<MessagePackMapperBuilder> mapperBuilder)
Specify a configuration for mapping between Java objects and MessagePack entities.
|
TarantoolClientBuilder |
withEventLoopThreadsNumber(int eventLoopThreadsNumber)
Specify netty threads number.
|
TarantoolClientBuilder |
withMessagePackMapper(MessagePackMapper mapper)
Specify a mapper between Java objects and MessagePack entities.
|
TarantoolClientBuilder |
withReadTimeout(int readTimeout)
Specify a response reading timeout.
|
TarantoolClientBuilder |
withRequestTimeout(int requestTimeout)
Specify a request timeout.
|
TarantoolClientBuilder |
withSecure(boolean isSecure)
Turn on secure connection or turn off secure connection.
|
TarantoolClientBuilder |
withSslContext(io.netty.handler.ssl.SslContext sslContext)
Specify SslContext with settings for establishing SSL/TLS connection between Tarantool
|
TarantoolClientBuilder |
withTarantoolClientConfig(TarantoolClientConfig config)
Specify a tarantool client config
It overrides previous settings for config
|
withProxyMethodMapping, withProxyMethodMapping, withRetrying, withRetrying, withRetryingByNumberOfAttempts, withRetryingByNumberOfAttempts, withRetryingByNumberOfAttempts, withRetryingByNumberOfAttempts, withRetryingByNumberOfAttempts, withRetryingIndefinitely, withRetryingIndefinitely, withRetryingIndefinitely, withRetryingIndefinitelyTarantoolClientBuilder withAddress(String host)
host - Tarantool server hostTarantoolClientBuilderTarantoolClientBuilder withAddress(String host, int port)
host - Tarantool server hostport - Tarantool server portTarantoolClientBuilderTarantoolClientBuilder withAddress(InetSocketAddress socketAddress)
socketAddress - remote server addressTarantoolClientBuilderTarantoolClientBuilder withAddresses(TarantoolServerAddress... address)
address - list of addresses of Tarantool instancesTarantoolClientBuilderTarantoolClientBuilder withAddresses(List<TarantoolServerAddress> addressList)
addressList - list of Tarantool instance addressesTarantoolClientBuilderTarantoolClientBuilder withAddressProvider(TarantoolClusterAddressProvider addressProvider)
addressProvider - TarantoolClusterAddressProviderTarantoolClientBuilderTarantoolClientBuilder withCredentials(TarantoolCredentials tarantoolCredentials)
tarantoolCredentials - credentials for all Tarantool server instancesTarantoolClientBuilderTarantoolClientBuilder withCredentials(String user, String password)
user - user to authenticate withpassword - password to authenticate withTarantoolClientBuilderwithCredentials(TarantoolCredentials tarantoolCredentials)TarantoolClientBuilder withAuthMechanism(AuthMechanism authMechanism)
authMechanism - configured authentication mechanismTarantoolClientBuilderTarantoolClientBuilder withConnections(int connections)
connections - the number of connections per one serverTarantoolClientBuilderTarantoolClientBuilder withDefaultMessagePackMapperConfiguration(UnaryOperator<MessagePackMapperBuilder> mapperBuilder)
This method takes a lambda as an argument, where the mapperBuilder is DefaultMessagePackMapper.Builder.
DefaultMessagePackMapperFactory.mapperBuilder - builder provider instance, e.g. a lambda function taking the builder
for MessagePackMapper instanceTarantoolClientBuilderTarantoolClientConfig.setMessagePackMapper(MessagePackMapper)TarantoolClientBuilder withMessagePackMapper(MessagePackMapper mapper)
DefaultMessagePackMapperFactory.mapper - configured MessagePackMapper instanceTarantoolClientBuilderTarantoolClientConfig.setMessagePackMapper(MessagePackMapper)TarantoolClientBuilder withRequestTimeout(int requestTimeout)
requestTimeout - the timeout for receiving a response from the Tarantool server, in millisecondsTarantoolClientBuilderTarantoolClientConfig.setRequestTimeout(int)TarantoolClientBuilder withConnectTimeout(int connectTimeout)
connectTimeout - the timeout for connecting to the Tarantool server, in millisecondsTarantoolClientBuilderTarantoolClientConfig.setConnectTimeout(int)TarantoolClientBuilder withReadTimeout(int readTimeout)
readTimeout - the timeout for reading the responses from Tarantool server, in millisecondsTarantoolClientBuilderTarantoolClientConfig.setReadTimeout(int)TarantoolClientBuilder withSecure(boolean isSecure)
isSecure - boolean flagTarantoolClientBuilderTarantoolClientBuilder withConnectionSelectionStrategy(ConnectionSelectionStrategyFactory connectionSelectionStrategyFactory)
connectionSelectionStrategyFactory - connection selection strategy factory instanceTarantoolClientBuilderTarantoolClientBuilder withConnectionSelectionStrategy(TarantoolConnectionSelectionStrategyType connectionSelectionStrategyType)
connectionSelectionStrategyType - built-in connection selection strategy factory typeTarantoolClientBuilderTarantoolClientBuilder withSslContext(io.netty.handler.ssl.SslContext sslContext)
sslContext - SslContext instanceTarantoolClientBuilderTarantoolClientBuilder withTarantoolClientConfig(TarantoolClientConfig config)
It overrides previous settings for config
config - tarantool client configTarantoolClientBuilderTarantoolClientBuilder withEventLoopThreadsNumber(int eventLoopThreadsNumber)
eventLoopThreadsNumber - number of threadsTarantoolClient<TarantoolTuple,TarantoolResult<TarantoolTuple>> build()
build in interface TarantoolClientConfigurator<TarantoolClientBuilder>TarantoolClientCopyright © 2025 Picodata. All rights reserved.