Package io.tarantool.driver.api
Class TarantoolClientConfig
- java.lang.Object
-
- io.tarantool.driver.api.TarantoolClientConfig
-
public class TarantoolClientConfig extends Object
Class-container forTarantoolClientconfiguration.It is recommended to use the
TarantoolClientConfig.Builderfor constructing the configuration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTarantoolClientConfig.BuilderA 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.Builderbuilder()Create a builder instance.intgetConnections()Get number of connections to be established with the target server.ConnectionSelectionStrategyFactorygetConnectionSelectionStrategyFactory()Get factory implementation for collection selection strategy instancesintgetConnectTimeout()Get TCP connection timeout, in millisecondsTarantoolCredentialsgetCredentials()Get Tarantool credentialsintgetCursorBatchSize()How many items will be fetched from server per cursor request.MessagePackMappergetMessagePackMapper()Get mapper between Java objects and MessagePack entitiesintgetReadTimeout()Get socket read timeout, in millisecondsintgetRequestTimeout()Get request completion timeout, in millisecondsio.netty.handler.ssl.SslContextgetSslContext()Get settings for establishing SSL/TLS connectionvoidsetConnections(int connections)Set number of connections to be established with the target servervoidsetConnectionSelectionStrategyFactory(ConnectionSelectionStrategyFactory connectionSelectionStrategyFactory)Set factory implementation for collection selection strategy instances, for example, an instance ofTarantoolConnectionSelectionStrategies.RoundRobinStrategyFactoryvoidsetConnectTimeout(int connectTimeout)Set TCP connection timeout, in millisecondsvoidsetCredentials(TarantoolCredentials credentials)Set Tarantool credentials storevoidsetMessagePackMapper(MessagePackMapper messagePackMapper)Set mapper between Java objects and MessagePack entitiesvoidsetReadTimeout(int readTimeout)Set socket read timeout, in millisecondsvoidsetRequestTimeout(int requestTimeout)Set request completion timeout, in millisecondsvoidsetSslContext(io.netty.handler.ssl.SslContext sslContext)SetSslContextfor 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)
SetSslContextfor establishing SSL/TLS connection- Parameters:
sslContext-SslContextinstance
-
getSslContext
public io.netty.handler.ssl.SslContext getSslContext()
Get settings for establishing SSL/TLS connection- Returns:
- a
SslContextinstance
-
getMessagePackMapper
public MessagePackMapper getMessagePackMapper()
Get mapper between Java objects and MessagePack entities- Returns:
- a
MessagePackMapperinstance
-
setMessagePackMapper
public void setMessagePackMapper(MessagePackMapper messagePackMapper)
Set mapper between Java objects and MessagePack entities- Parameters:
messagePackMapper-MessagePackMapperinstance
-
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
-
-