|
|
@ -193,7 +193,7 @@ public abstract class RedissonObject implements RObject {
|
|
|
|
List<Object> args = new LinkedList<>();
|
|
|
|
List<Object> args = new LinkedList<>();
|
|
|
|
args.add(keys.get(0));
|
|
|
|
args.add(keys.get(0));
|
|
|
|
args.add(keys.get(1));
|
|
|
|
args.add(keys.get(1));
|
|
|
|
if (database > 0) {
|
|
|
|
if (database >= 0) {
|
|
|
|
args.add("DB");
|
|
|
|
args.add("DB");
|
|
|
|
args.add(database);
|
|
|
|
args.add(database);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -213,13 +213,14 @@ public abstract class RedissonObject implements RObject {
|
|
|
|
+ "else "
|
|
|
|
+ "else "
|
|
|
|
+ "res = res + redis.call('copy', KEYS[j], KEYS[newKeysIndex + j], 'db', ARGV[1]); "
|
|
|
|
+ "res = res + redis.call('copy', KEYS[j], KEYS[newKeysIndex + j], 'db', ARGV[1]); "
|
|
|
|
+ "end; "
|
|
|
|
+ "end; "
|
|
|
|
+ "end; "
|
|
|
|
+ "else "
|
|
|
|
+ "if ARGV[2] == '1' then "
|
|
|
|
+ "if ARGV[2] == '1' then "
|
|
|
|
+ "res = res + redis.call('copy', KEYS[j], KEYS[newKeysIndex + j], 'replace'); "
|
|
|
|
+ "res = res + redis.call('copy', KEYS[j], KEYS[newKeysIndex + j], 'replace'); "
|
|
|
|
+ "else "
|
|
|
|
+ "else "
|
|
|
|
+ "res = res + redis.call('copy', KEYS[j], KEYS[newKeysIndex + j]); "
|
|
|
|
+ "res = res + redis.call('copy', KEYS[j], KEYS[newKeysIndex + j]); "
|
|
|
|
+ "end; "
|
|
|
|
+ "end; "
|
|
|
|
+ "end; "
|
|
|
|
+ "end; "
|
|
|
|
|
|
|
|
+ "end; "
|
|
|
|
+ "return math.min(res, 1); ",
|
|
|
|
+ "return math.min(res, 1); ",
|
|
|
|
keys,
|
|
|
|
keys,
|
|
|
|
database, Boolean.compare(replace, false));
|
|
|
|
database, Boolean.compare(replace, false));
|
|
|
|