public class TarantoolClientConfig extends Object
TarantoolClient
configuration.
It is recommended to use the TarantoolClientConfig.Builder
for constructing the configuration
Modifier and Type | Class and Description |
---|---|
static class |
TarantoolClientConfig.Builder
A builder for
TarantoolClientConfig |
Constructor and Description |
---|
TarantoolClientConfig()
Basic constructor.
|
TarantoolClientConfig(TarantoolClientConfig config)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
static TarantoolClientConfig.Builder |
builder()
Create a builder instance.
|
AuthMechanism |
getAuthMechanism()
Get server authentication mechanism
|
int |
getConnections()
Get number of connections to be established with the target server.
|
ConnectionSelectionStrategyFactory |
getConnectionSelectionStrategyFactory()
Get factory implementation for collection selection strategy instances
|
int |
getConnectTimeout()
Get TCP connection timeout, in milliseconds
|
TarantoolCredentials |
getCredentials()
Get Tarantool credentials
|
int |
getCursorBatchSize()
How many items will be fetched from server per cursor request.
|
int |
getEventLoopThreadsNumber()
Get number of set up internal event loop threads.
|
MessagePackMapper |
getMessagePackMapper()
Get mapper between Java objects and MessagePack entities
|
int |
getReadTimeout()
Get socket read timeout, in milliseconds
|
int |
getRequestTimeout()
Get request completion timeout, in milliseconds
|
io.netty.handler.ssl.SslContext |
getSslContext()
Get settings for establishing SSL/TLS connection
|
int |
getWriteBatchSize()
Get maximum number of requests to be sent in one batch to the server.
|
boolean |
isSecure()
Gets a flag that determines client uses encryption for binary connections or not
|
void |
setAuthMechanism(AuthMechanism authMechanism)
Set server authentication mechanism
|
void |
setConnections(int connections)
Set number of connections to be established with the target server
|
void |
setConnectionSelectionStrategyFactory(ConnectionSelectionStrategyFactory connectionSelectionStrategyFactory)
Set factory implementation for collection selection strategy instances, for example, an instance of
TarantoolConnectionSelectionStrategies.RoundRobinStrategyFactory |
void |
setConnectTimeout(int connectTimeout)
Set TCP connection timeout, in milliseconds
|
void |
setCredentials(TarantoolCredentials credentials)
Set Tarantool credentials store
|
void |
setEventLoopThreadsNumber(int eventLoopThreadsNumber)
Set number of internal event loop threads.
|
void |
setMessagePackMapper(MessagePackMapper messagePackMapper)
Set mapper between Java objects and MessagePack entities
|
void |
setReadTimeout(int readTimeout)
Set socket read timeout, in milliseconds
|
void |
setRequestTimeout(int requestTimeout)
Set request completion timeout, in milliseconds
|
void |
setSecure(boolean isSecure)
Turn on secure connection or turn off secure connection
|
void |
setSslContext(io.netty.handler.ssl.SslContext sslContext)
Set
SslContext for establishing SSL/TLS connection |
void |
setWriteBatchSize(int writeBatchSize)
Set maximum number of requests to be sent in one batch to the server.
|
public TarantoolClientConfig()
public TarantoolClientConfig(TarantoolClientConfig config)
config
- whose internal fields will be copiedpublic TarantoolCredentials getCredentials()
TarantoolCredentials
public void setCredentials(TarantoolCredentials credentials)
credentials
- Tarantool user credentialsTarantoolCredentials
public AuthMechanism getAuthMechanism()
TarantoolAuthMechanism.DEFAULT
.public void setAuthMechanism(AuthMechanism authMechanism)
authMechanism
- server authentication mechanismpublic int getConnectTimeout()
public void setConnectTimeout(int connectTimeout)
connectTimeout
- timeout for establishing a connection to Tarantool serverpublic int getRequestTimeout()
public void setRequestTimeout(int requestTimeout)
requestTimeout
- timeout for receiving the response for a request to Tarantool serverpublic int getReadTimeout()
public void setReadTimeout(int readTimeout)
readTimeout
- timeout for reading data from a socket, in millisecondspublic int getConnections()
public void setConnections(int connections)
connections
- number of server connectionspublic void setSslContext(io.netty.handler.ssl.SslContext sslContext)
SslContext
for establishing SSL/TLS connectionsslContext
- SslContext
instancepublic io.netty.handler.ssl.SslContext getSslContext()
SslContext
instancepublic boolean isSecure()
public void setSecure(boolean isSecure)
isSecure
- boolean flagpublic MessagePackMapper getMessagePackMapper()
MessagePackMapper
instancepublic void setMessagePackMapper(MessagePackMapper messagePackMapper)
messagePackMapper
- MessagePackMapper
instancepublic ConnectionSelectionStrategyFactory getConnectionSelectionStrategyFactory()
public void setConnectionSelectionStrategyFactory(ConnectionSelectionStrategyFactory connectionSelectionStrategyFactory)
TarantoolConnectionSelectionStrategies.RoundRobinStrategyFactory
connectionSelectionStrategyFactory
- connection selection strategy factory instancepublic int getCursorBatchSize()
public static TarantoolClientConfig.Builder builder()
public int getEventLoopThreadsNumber()
public void setEventLoopThreadsNumber(int eventLoopThreadsNumber)
eventLoopThreadsNumber
- number of threadspublic int getWriteBatchSize()
public void setWriteBatchSize(int writeBatchSize)
writeBatchSize
- maximum number of requests in batchCopyright © 2025 Picodata. All rights reserved.