|
|
|
@ -29,12 +29,12 @@ public class LettuceRedisUtils {
|
|
|
|
|
static {
|
|
|
|
|
RedisURI redisUri = null;
|
|
|
|
|
if (StrUtil.equals(AustinFlinkConstant.REDIS_MODE_SENTINEL, AustinFlinkConstant.REDIS_MODE)) {
|
|
|
|
|
redisUri = RedisURI.Builder.sentinel(AustinFlinkConstant.REDIS_IP, AustinFlinkConstant.MASTER_ID)
|
|
|
|
|
redisUri = RedisURI.Builder.sentinel(AustinFlinkConstant.REDIS_IP, AustinFlinkConstant.REDIS_PORT, AustinFlinkConstant.MASTER_ID)
|
|
|
|
|
.withPassword(AustinFlinkConstant.REDIS_PASSWORD.toCharArray())
|
|
|
|
|
.build();
|
|
|
|
|
} else if (StrUtil.equals(AustinFlinkConstant.REDIS_MODE_SINGLE, AustinFlinkConstant.REDIS_MODE)) {
|
|
|
|
|
redisUri = RedisURI.Builder.redis(AustinFlinkConstant.REDIS_IP)
|
|
|
|
|
.withPort(Integer.valueOf(AustinFlinkConstant.REDIS_PORT))
|
|
|
|
|
.withPort(AustinFlinkConstant.REDIS_PORT)
|
|
|
|
|
.withPassword(AustinFlinkConstant.REDIS_PASSWORD.toCharArray())
|
|
|
|
|
.build();
|
|
|
|
|
}
|
|
|
|
|