Class TarantoolConnectionFactory
- java.lang.Object
- 
- io.tarantool.driver.core.connection.TarantoolConnectionFactory
 
- 
 public class TarantoolConnectionFactory extends Object Manages instantiation and connection procedures for Tarantool server connections
- 
- 
Constructor SummaryConstructors Constructor Description TarantoolConnectionFactory(TarantoolClientConfig config, io.netty.bootstrap.Bootstrap bootstrap, ScheduledExecutorService timeoutScheduler)Basic constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<CompletableFuture<TarantoolConnection>>multiConnection(InetSocketAddress serverAddress, int connections, TarantoolConnectionListeners connectionListeners)Create several connections and return their futuresCompletableFuture<TarantoolConnection>singleConnection(InetSocketAddress serverAddress, TarantoolConnectionListeners connectionListeners)Create single connection and return connection future
 
- 
- 
- 
Constructor Detail- 
TarantoolConnectionFactorypublic TarantoolConnectionFactory(TarantoolClientConfig config, io.netty.bootstrap.Bootstrap bootstrap, ScheduledExecutorService timeoutScheduler) Basic constructor.- Parameters:
- config- Tarantool client config
- bootstrap- prepared Netty's bootstrap
- timeoutScheduler- scheduled executor for limiting the connection tasks by timeout
 
 
- 
 - 
Method Detail- 
singleConnectionpublic CompletableFuture<TarantoolConnection> singleConnection(InetSocketAddress serverAddress, TarantoolConnectionListeners connectionListeners) Create single connection and return connection future- Parameters:
- serverAddress- Tarantool server address to connect
- connectionListeners- listeners for the event of establishing the connection
- Returns:
- connection future
 
 - 
multiConnectionpublic Collection<CompletableFuture<TarantoolConnection>> multiConnection(InetSocketAddress serverAddress, int connections, TarantoolConnectionListeners connectionListeners) Create several connections and return their futures- Parameters:
- serverAddress- Tarantool server address to connect
- connections- number of connections to create
- connectionListeners- listeners for the event of establishing the connection
- Returns:
- a collection with specified number of connection futures
 
 
- 
 
-