code: @Override
  	public synchronized ThriftSocket buildThriftSocket(ClientSocketPoolParameters parameters) throws IkasoaException {
  		if (!ServerUtil.checkHostAndPort(parameters.getHost(), parameters.getPort()))
  			throw new IllegalArgumentException("Server host or port is null !");
  		SimpleSocketPoolImpl self = selfMap.get(parameters.getKey());
  		if (self == null || self.socketStatusArray == null)
  			self = init(parameters);
  		byte i = 0;
  		for (; i < size; i++)
  			if (!self.socketStatusArray[i]) {
  				ThriftSocket thriftSocket = getThriftSocket(self, i, parameters);
  				if (!thriftSocket.isOpen()) {
  					// 如果socket未连接,则新建一个socket
  					// TODO: 用isOpen方法判断是否保持连接并不准确,所以这里有可能会额外创建一些socket
  					thriftSocket = parameters.buildClientThriftSocket();
  					self.socketPool.put(new Byte(i), thriftSocket);
  				}
  				self.socketStatusArray[i] = Boolean.TRUE;
  				return thriftSocket;
  			}
  		// 如果连接不够用,就初始化连接池.
  		try {
  			for (i = 0; i < size; i++) {
  				ThriftSocket thriftSocket = self.socketPool.get(i);
  				if (self.socketStatusArray[i] && (thriftSocket == null || thriftSocket.getSocket() == null
  						|| (thriftSocket.isOpen() && thriftSocket.getSocket().isClosed()))) {
  					return parameters.buildClientThriftSocket();
  				}
  			}
  		} catch (Exception e) {
  			throw new RuntimeException(e);
  		}
  		log.warn("Not enough pooled connection ! Again retry initiation pool .");
  		init(parameters);
  		return buildThriftSocket(parameters);
  	}
docs: 从连接池中获取一个空闲的ThriftSocket连接
  
  @param parameters
  Socket连接池参数对象
  @throws IkasoaException
  异常