Ejemplo n.º 1
0
        internal void EnsureDiscovery()
        {
            lock (_syncLock)
            {
                if (!_clusterView.IsStale())
                {
                    return;
                }

                var newView = NewClusterView();
                _clusterConnectionPool.Update(newView.All());
                _clusterView = newView;
            }
        }
Ejemplo n.º 2
0
        private void EnsureRoutingTableForMode(AccessMode mode)
        {
            lock (_syncLock)
            {
                if (!IsRoutingTableStale(_routingTable, mode))
                {
                    return;
                }

                var routingTable = UpdateRoutingTableWithInitialUriFallback();
                _clusterConnectionPool.Update(routingTable.All());
                _routingTable = routingTable;
                _logger?.Info($"Updated routingTable to be {_routingTable}");
            }
        }
Ejemplo n.º 3
0
 public void UpdateConnectionPool(IEnumerable <Uri> added, IEnumerable <Uri> removed)
 {
     _clusterConnectionPool.Update(added, removed);
 }