code: public static RedisConnectionFactory newRedisConnectionFactory(final BaseRedisProperties redis) {
          val redisConfiguration = redis.getSentinel() == null
              ? (RedisConfiguration) getStandaloneConfig(redis)
              : getSentinelConfig(redis);
  
          val factory = new LettuceConnectionFactory(redisConfiguration, getRedisPoolConfig(redis));
  
          return factory;
      }
docs: New redis connection factory.
  
  @param redis the redis
  @return the redis connection factory