public static <K, V> StatefulRedisMasterSlaveConnection<K, V> connect(RedisClient redisClient, RedisCodec<K, V> codec,
            RedisURI redisURI) {

        LettuceAssert.notNull(redisClient, "RedisClient must not be null");
        LettuceAssert.notNull(codec, "RedisCodec must not be null");
        LettuceAssert.notNull(redisURI, "RedisURI must not be null");

        return getConnection(connectAsyncSentinelOrAutodiscovery(redisClient, codec, redisURI), redisURI);
    }
public static < K , V > StatefulRedisMasterSlaveConnection < K , V > connect ( RedisClient redisClient , RedisCodec < K , V > codec , RedisURI redisURI ) { LettuceAssert . notNull ( redisClient , "RedisClient must not be null" ) ; LettuceAssert . notNull ( codec , "RedisCodec must not be null" ) ; LettuceAssert . notNull ( redisURI , "RedisURI must not be null" ) ; return getConnection ( connectAsyncSentinelOrAutodiscovery ( redisClient , codec , redisURI ) , redisURI ) ; }
Open a new connection to a Redis Master-Slave server/servers using the supplied {@link RedisURI} and the supplied
{@link RedisCodec codec} to encode/decode keys.
<p>
This {@link MasterSlave} performs auto-discovery of nodes using either Redis Sentinel or Master/Slave. A {@link RedisURI}
can point to either a master or a replica host.
</p>

@param redisClient the Redis client.
@param codec Use this codec to encode/decode keys and values, must not be {@literal null}.
@param redisURI the Redis server to connect to, must not be {@literal null}.
@param <K> Key type.
@param <V> Value type.
@return a new connection.