code: public static MemcachedClient newMemcachedClient(String hostsAndPorts, long connTimeoutMs,
              int connPoolSize) throws IOException {
          hostsAndPorts = StringUtils.join(hostsAndPorts.split("[\\s,;]+"), ' ');
          MemcachedClientBuilder builder = new XMemcachedClientBuilder(
                  AddrUtil.getAddresses(hostsAndPorts));
          builder.setConnectTimeout(connTimeoutMs);
          builder.setConnectionPoolSize(connPoolSize);
          return builder.build();
      }
docs: Creates a new {@link MemcachedClient}, with specified connection timeout
  and connection pool size.
  
  @param hostsAndPorts
  Memcached' hosts and ports scheme (format
  {@code host1:port1,host2:port2}).
  @param connTimeoutMs
  @param connPoolSize
  @return
  @throws IOException