Package io.tarantool.driver.core
Class ClusterTarantoolClient<T extends Packable,R extends Collection<T>>
- java.lang.Object
-
- io.tarantool.driver.core.AbstractTarantoolClient<T,R>
-
- io.tarantool.driver.core.ClusterTarantoolClient<T,R>
-
- Type Parameters:
T
- target tuple typeR
- target tuple collection type
- All Implemented Interfaces:
TarantoolCallOperations
,TarantoolClient<T,R>
,TarantoolEvalOperations
,AutoCloseable
- Direct Known Subclasses:
ClusterTarantoolTupleClient
public abstract class ClusterTarantoolClient<T extends Packable,R extends Collection<T>> extends AbstractTarantoolClient<T,R>
Main class for connecting to a cluster of Tarantool servers. Provides basic API for interacting with the database and manages connections. Connects to all configured Tarantool server addresses simultaneously and dynamically selects the target server for performing the next request accordingly to the provided connection selection strategy. The credentials for connecting to each server are expected to be the same.
-
-
Constructor Summary
Constructors Constructor Description ClusterTarantoolClient(TarantoolClientConfig config, TarantoolClusterAddressProvider addressProvider)
Create a client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TarantoolConnectionManager
connectionManager(TarantoolClientConfig config, TarantoolConnectionFactory connectionFactory, TarantoolConnectionListeners listeners)
Provides a connection manager for Tarantool server connectionsprotected TarantoolClusterAddressProvider
getAddressProvider()
-
Methods inherited from class io.tarantool.driver.core.AbstractTarantoolClient
call, call, call, call, call, call, call, call, call, call, callForMultiResult, callForMultiResult, callForMultiResult, callForMultiResult, callForMultiResult, callForMultiResult, callForMultiResult, callForMultiResult, callForMultiResult, callForSingleResult, callForSingleResult, callForSingleResult, callForSingleResult, callForSingleResult, callForSingleResult, callForSingleResult, callForSingleResult, callForSingleResult, close, eval, eval, eval, eval, eval, getBootstrap, getConfig, getConnectionListeners, getResultMapperFactoryFactory, getVersion, metadata, metadataProvider, refresh, space, space, spaceOperations
-
-
-
-
Constructor Detail
-
ClusterTarantoolClient
public ClusterTarantoolClient(TarantoolClientConfig config, TarantoolClusterAddressProvider addressProvider)
Create a client. The server address for connecting to the server is specified by the passed address provider.- Parameters:
config
- the client configurationaddressProvider
- provides Tarantool server address for connection- See Also:
TarantoolClientConfig
-
-
Method Detail
-
connectionManager
protected TarantoolConnectionManager connectionManager(TarantoolClientConfig config, TarantoolConnectionFactory connectionFactory, TarantoolConnectionListeners listeners)
Description copied from class:AbstractTarantoolClient
Provides a connection manager for Tarantool server connections- Specified by:
connectionManager
in classAbstractTarantoolClient<T extends Packable,R extends Collection<T>>
- Parameters:
config
- contains Tarantool client configuration optionsconnectionFactory
- provides helper methods for connection instantiationlisteners
- listeners which will be invoked once all connections are established- Returns:
- connection manager
-
getAddressProvider
protected TarantoolClusterAddressProvider getAddressProvider()
-
-