Class TarantoolConnectionFactory


  • public class TarantoolConnectionFactory
    extends Object
    Manages instantiation and connection procedures for Tarantool server connections
    • Constructor Detail

      • TarantoolConnectionFactory

        public 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

      • multiConnection

        public 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