code: public static <K, V> StatefulRedisMasterReplicaConnection<K, V> connect(RedisClient redisClient, RedisCodec<K, V> codec,
              RedisURI redisURI) {
  
          return new MasterReplicaConnectionWrapper<>(MasterSlave.connect(redisClient, codec, redisURI));
      }
docs: Open a new connection to a Redis Master-Replica server/servers using the supplied {@link RedisURI} and the supplied
  {@link RedisCodec codec} to encode/decode keys.
  <p>
  This {@link MasterReplica} performs auto-discovery of nodes using either Redis Sentinel or Master/Replica. 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.