// for test only internal LoadBalancer( IClusterConnectionPool clusterConnPool, IRoutingTableManager routingTableManager) { _clusterConnectionPool = clusterConnPool; _routingTableManager = routingTableManager; var config = Config.DefaultConfig; _loadBalancingStrategy = CreateLoadBalancingStrategy(config.LoadBalancingStrategy, clusterConnPool, config.Logger); }
public LoadBalancer( IPooledConnectionFactory connectionFactory, RoutingSettings routingSettings, ConnectionPoolSettings poolSettings, IDriverLogger logger) { _logger = logger; _clusterConnectionPool = new ClusterConnectionPool(Enumerable.Empty <Uri>(), connectionFactory, poolSettings, logger); _routingTableManager = new RoutingTableManager(routingSettings, this, logger); _loadBalancingStrategy = CreateLoadBalancingStrategy(routingSettings.Strategy, _clusterConnectionPool, _logger); }
public LoadBalancer( IPooledConnectionFactory connectionFactory, RoutingSettings routingSettings, ConnectionPoolSettings poolSettings, ILogger logger) { _logger = logger; var uris = routingSettings.InitialServers; _clusterConnectionPool = new ClusterConnectionPool(uris, connectionFactory, poolSettings, logger); _routingTableManager = new RoutingTableManager(routingSettings, this, logger); _loadBalancingStrategy = CreateLoadBalancingStrategy(routingSettings.Strategy, _clusterConnectionPool, logger); }
public LoadBalancer( IPooledConnectionFactory connectionFactory, RoutingSettings routingSettings, ConnectionPoolSettings poolSettings, ILogger logger) { _logger = logger; _clusterConnectionPool = new ClusterConnectionPool(Enumerable.Empty <Uri>(), connectionFactory, poolSettings, logger); _routingTableManager = new RoutingTableManager(routingSettings, this, logger); _loadBalancingStrategy = CreateLoadBalancingStrategy(_clusterConnectionPool, _logger); _initialServerAddressProvider = routingSettings.InitialServerAddressProvider; }