Package io.tarantool.driver.api
Class TarantoolClientConfig
- java.lang.Object
-
- io.tarantool.driver.api.TarantoolClientConfig
-
public class TarantoolClientConfig extends Object
Class-container forTarantoolClient
configuration.It is recommended to use the
TarantoolClientConfig.Builder
for constructing the configuration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TarantoolClientConfig.Builder
A builder forTarantoolClientConfig
-
Constructor Summary
Constructors Constructor Description TarantoolClientConfig()
Basic constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TarantoolClientConfig.Builder
builder()
Create a builder instance.int
getConnections()
Get number of connections to be established with the target server.ConnectionSelectionStrategyFactory
getConnectionSelectionStrategyFactory()
Get factory implementation for collection selection strategy instancesint
getConnectTimeout()
Get TCP connection timeout, in millisecondsTarantoolCredentials
getCredentials()
Get Tarantool credentialsint
getCursorBatchSize()
How many items will be fetched from server per cursor request.MessagePackMapper
getMessagePackMapper()
Get mapper between Java objects and MessagePack entitiesint
getReadTimeout()
Get socket read timeout, in millisecondsint
getRequestTimeout()
Get request completion timeout, in millisecondsio.netty.handler.ssl.SslContext
getSslContext()
Get settings for establishing SSL/TLS connectionvoid
setConnections(int connections)
Set number of connections to be established with the target servervoid
setConnectionSelectionStrategyFactory(ConnectionSelectionStrategyFactory connectionSelectionStrategyFactory)
Set factory implementation for collection selection strategy instances, for example, an instance ofTarantoolConnectionSelectionStrategies.RoundRobinStrategyFactory
void
setConnectTimeout(int connectTimeout)
Set TCP connection timeout, in millisecondsvoid
setCredentials(TarantoolCredentials credentials)
Set Tarantool credentials storevoid
setMessagePackMapper(MessagePackMapper messagePackMapper)
Set mapper between Java objects and MessagePack entitiesvoid
setReadTimeout(int readTimeout)
Set socket read timeout, in millisecondsvoid
setRequestTimeout(int requestTimeout)
Set request completion timeout, in millisecondsvoid
setSslContext(io.netty.handler.ssl.SslContext sslContext)
SetSslContext
for establishing SSL/TLS connection
-
-
-
Method Detail
-
getCredentials
public TarantoolCredentials getCredentials()
Get Tarantool credentials- Returns:
- configured Tarantool user credentials
- See Also:
TarantoolCredentials
-
setCredentials
public void setCredentials(TarantoolCredentials credentials)
Set Tarantool credentials store- Parameters:
credentials
- Tarantool user credentials- See Also:
TarantoolCredentials
-
getConnectTimeout
public int getConnectTimeout()
Get TCP connection timeout, in milliseconds- Returns:
- a number
-
setConnectTimeout
public void setConnectTimeout(int connectTimeout)
Set TCP connection timeout, in milliseconds- Parameters:
connectTimeout
- timeout for establishing a connection to Tarantool server
-
getRequestTimeout
public int getRequestTimeout()
Get request completion timeout, in milliseconds- Returns:
- a number
-
setRequestTimeout
public void setRequestTimeout(int requestTimeout)
Set request completion timeout, in milliseconds- Parameters:
requestTimeout
- timeout for receiving the response for a request to Tarantool server
-
getReadTimeout
public int getReadTimeout()
Get socket read timeout, in milliseconds- Returns:
- a number
-
setReadTimeout
public void setReadTimeout(int readTimeout)
Set socket read timeout, in milliseconds- Parameters:
readTimeout
- timeout for reading data from a socket, in milliseconds
-
getConnections
public int getConnections()
Get number of connections to be established with the target server. Default value is 1- Returns:
- number of server connections
-
setConnections
public void setConnections(int connections)
Set number of connections to be established with the target server- Parameters:
connections
- number of server connections
-
setSslContext
public void setSslContext(io.netty.handler.ssl.SslContext sslContext)
SetSslContext
for establishing SSL/TLS connection- Parameters:
sslContext
-SslContext
instance
-
getSslContext
public io.netty.handler.ssl.SslContext getSslContext()
Get settings for establishing SSL/TLS connection- Returns:
- a
SslContext
instance
-
getMessagePackMapper
public MessagePackMapper getMessagePackMapper()
Get mapper between Java objects and MessagePack entities- Returns:
- a
MessagePackMapper
instance
-
setMessagePackMapper
public void setMessagePackMapper(MessagePackMapper messagePackMapper)
Set mapper between Java objects and MessagePack entities- Parameters:
messagePackMapper
-MessagePackMapper
instance
-
getConnectionSelectionStrategyFactory
public ConnectionSelectionStrategyFactory getConnectionSelectionStrategyFactory()
Get factory implementation for collection selection strategy instances- Returns:
- connection selection strategy factory instance
-
setConnectionSelectionStrategyFactory
public void setConnectionSelectionStrategyFactory(ConnectionSelectionStrategyFactory connectionSelectionStrategyFactory)
Set factory implementation for collection selection strategy instances, for example, an instance ofTarantoolConnectionSelectionStrategies.RoundRobinStrategyFactory
- Parameters:
connectionSelectionStrategyFactory
- connection selection strategy factory instance
-
getCursorBatchSize
public int getCursorBatchSize()
How many items will be fetched from server per cursor request.- Returns:
- default size of a batch for a cursor.
-
builder
public static TarantoolClientConfig.Builder builder()
Create a builder instance.- Returns:
- a builder
-
-