Amazon.ElastiCacheCluster/DiscoveryNode.cs
/// <summary>
/// Parses the string NodeConfig into a list of IPEndPoints for configuration
/// </summary>
/// <returns>A list of IPEndPoints for config to use</returns>
Parses the string NodeConfig into a list of IPEndPoints for configuration
Parses the string NodeConfig into a list of IPEndPoints for configuration
internal List<IPEndPoint> GetEndPointList()
        {
            try
            {
                var endpoints = AddrUtil.HashEndPointList(this.GetNodeConfig());
                lock (nodesLock)
                {
                    var nodesToRemove = new HashSet<IMemcachedNode>();
                    foreach (var node in this.nodes)
                    {
                        if (!endpoints.Contains(node.EndPoint))
                            nodesToRemove.Add(node);
                    }
                    foreach (var node in nodesToRemove)
                    {
                        this.nodes.Remove(node);
                    }
                    foreach (var point in endpoints)
                    {
                        if (this.nodes.FirstOrDefault(x => x.EndPoint.Equals(point)) == null)
                        {
                            this.nodes.Add(this.config.nodeFactory.CreateNode(point, this.config.SocketPool));
                        }
                    }
                }
                return endpoints;
            }
            catch (Exception ex)
            {
                log.Debug("Error getting endpoints list", ex);
                throw;
            }
        }
internal List < IPEndPoint > GetEndPointList ( ) { try { var endpoints = AddrUtil . HashEndPointList ( this . GetNodeConfig ( ) ) ; lock ( nodesLock ) { var nodesToRemove = new HashSet < IMemcachedNode > ( ) ; foreach ( var node in this . nodes ) { if ( ! endpoints . Contains ( node . EndPoint ) ) nodesToRemove . Add ( node ) ; } foreach ( var node in nodesToRemove ) { this . nodes . Remove ( node ) ; } foreach ( var point in endpoints ) { if ( this . nodes . FirstOrDefault ( x => x . EndPoint . Equals ( point ) ) == null ) { this . nodes . Add ( this . config . nodeFactory . CreateNode ( point , this . config . SocketPool ) ) ; } } } return endpoints ; } catch ( Exception ex ) { log . Debug ( " " , ex ) ; throw ; } }
Parses the string NodeConfig into a list of IPEndPoints for configuration
Parses the string NodeConfig into a list of IPEndPoints for configuration
// Error getting the list of endpoints. Most likely this is due to the // client being used outside of EC2. 
A list of IPEndPoints for config to use
A list of IPEndPoints for config to use