示例#1
0
 internal SocketPool(ServerPool owner, string host)
 {
     Host       = host;
     this.owner = owner;
     endPoint   = getEndPoint(host);
     queue      = new Queue <PooledSocket>();
 }
示例#2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="name"></param>
 /// <param name="scope"></param>
 /// <param name="servers"></param>
 internal MemcachedProxy(string name, ServerScope scope, IList <ServerNode> servers)
 {
     if (string.IsNullOrEmpty(name))
     {
         throw new ConfigurationErrorsException("Name of MemcachedClient instance cannot be empty.");
     }
     if ((servers == null) || (servers.Count == 0))
     {
         throw new ConfigurationErrorsException("Cannot configure MemcachedClient with empty list of hosts.");
     }
     this.Name       = name;
     this.KeyPrefix  = string.Format("_{0}_", name);
     this.serverPool = new ServerPool(servers, scope);
 }