code: public static JedisCluster newJedisCluster(JedisPoolConfig poolConfig, String hostsAndPorts,
              String password, int timeoutMs, int maxAttempts) {
          Set<HostAndPort> clusterNodes = new HashSet<>();
          String[] hapList = hostsAndPorts.split("[,;\\s]+");
          for (String hostAndPort : hapList) {
              String[] tokens = hostAndPort.split(":");
              String host = tokens.length > 0 ? tokens[0] : Protocol.DEFAULT_HOST;
              int port = tokens.length > 1 ? Integer.parseInt(tokens[1]) : Protocol.DEFAULT_PORT;
              clusterNodes.add(new HostAndPort(host, port));
          }
          JedisCluster jedisCluster = new JedisCluster(clusterNodes, timeoutMs, timeoutMs,
                  maxAttempts, StringUtils.isBlank(password) ? null : password,
                  poolConfig != null ? poolConfig : defaultJedisPoolConfig());
          return jedisCluster;
      }
docs: Create a new {@link JedisCluster}.
  
  @param poolConfig
  format {@code host1:port1,host2:port2,...}, default Redis port is used if not
  specified
  @param password
  @param timeoutMs
  @param maxAttempts
  @return