Class TarantoolClusterConnectionManager
- java.lang.Object
-
- io.tarantool.driver.core.connection.AbstractTarantoolConnectionManager
-
- io.tarantool.driver.core.connection.TarantoolClusterConnectionManager
-
- All Implemented Interfaces:
TarantoolConnectionManager
,AutoCloseable
public class TarantoolClusterConnectionManager extends AbstractTarantoolConnectionManager
Implementation ofAbstractTarantoolConnectionManager
, aware of connecting to the Tarantool cluster
-
-
Constructor Summary
Constructors Constructor Description TarantoolClusterConnectionManager(TarantoolClientConfig config, TarantoolConnectionFactory connectionFactory, TarantoolConnectionListeners listeners, TarantoolClusterAddressProvider addressProvider)
Basic constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected Collection<TarantoolServerAddress>
getAddresses()
Get server addresses to connect to.-
Methods inherited from class io.tarantool.driver.core.connection.AbstractTarantoolConnectionManager
getConnection, refresh
-
-
-
-
Constructor Detail
-
TarantoolClusterConnectionManager
public TarantoolClusterConnectionManager(TarantoolClientConfig config, TarantoolConnectionFactory connectionFactory, TarantoolConnectionListeners listeners, TarantoolClusterAddressProvider addressProvider)
Basic constructor.- Parameters:
config
- client configurationconnectionFactory
- manages instantiation of Tarantool server connectionslisteners
- are invoked after connection is establishedaddressProvider
- provides Tarantool server nodes addresses
-
-
Method Detail
-
getAddresses
protected Collection<TarantoolServerAddress> getAddresses()
Description copied from class:AbstractTarantoolConnectionManager
Get server addresses to connect to. They must belong to one cluster and contain the information necessary for the internalConnectionSelectionStrategy
instance.- Specified by:
getAddresses
in classAbstractTarantoolConnectionManager
- Returns:
- Tarantool server addresses
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classAbstractTarantoolConnectionManager
-
-