public static JedisPool newJedisPool(JedisPoolConfig poolConfig, String hostAndPort,
            String password, int db, int timeoutMs) {
        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;
        JedisPool jedisPool = new JedisPool(
                poolConfig != null ? poolConfig : defaultJedisPoolConfig(), host, port, timeoutMs,
                StringUtils.isBlank(password) ? null : password, db);
        return jedisPool;
    }
public static JedisPool newJedisPool ( JedisPoolConfig poolConfig , String hostAndPort , String password , int db , int timeoutMs ) { 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 ; JedisPool jedisPool = new JedisPool ( poolConfig != null ? poolConfig : defaultJedisPoolConfig ( ) , host , port , timeoutMs , StringUtils . isBlank ( password ) ? null : password , db ) ; return jedisPool ; }
Create a new {@link JedisPool}.

@param poolConfig
@param hostAndPort
format {@code host:port} or {@code host}, default Redis port is used if not
specified
@param password
@param db
@param timeoutMs
@return