Merge branch 'master' of github.com:mrniko/redisson

pull/472/head
Nikita 9 years ago
commit 6a1cc63b0b

@ -131,7 +131,7 @@ public class RedissonListMultimapCache<K, V> extends RedissonListMultimap<K, V>
+ "end; "
+ "if expireDate > tonumber(ARGV[1]) then " +
"local items = redis.call('lrange', KEYS[1], 0, -1); " +
"for i=0, #items do " +
"for i = 1, #items do " +
"if items[i] == ARGV[3] then " +
"return 1; " +
"end; " +

@ -179,7 +179,7 @@ public class RedissonSubList<V> extends RedissonList<V> implements RList<V> {
"local items = redis.call('lrange', KEYS[1], fromIndex, toIndex); " +
"for i=1, #items do " +
"for j = 0, #ARGV, 1 do " +
"for j = 1, #ARGV, 1 do " +
"if items[i] == ARGV[j] then " +
"redis.call('lrem', KEYS[1], count, ARGV[i]); " +
"v = 1; " +

@ -140,8 +140,8 @@ public class RedissonScoredSortedSetReactive<V> extends RedissonExpirableReactiv
public Publisher<Boolean> containsAll(Collection<?> c) {
return commandExecutor.evalReadReactive(getName(), codec, new RedisCommand<Boolean>("EVAL", new BooleanReplayConvertor(), 4, ValueType.OBJECTS),
"local s = redis.call('zrange', KEYS[1], 0, -1);" +
"for i = 0, table.getn(s), 1 do " +
"for j = 0, table.getn(ARGV), 1 do "
"for i = 1, table.getn(s), 1 do " +
"for j = 1, table.getn(ARGV), 1 do "
+ "if ARGV[j] == s[i] "
+ "then table.remove(ARGV, j) end "
+ "end; "
@ -154,7 +154,7 @@ public class RedissonScoredSortedSetReactive<V> extends RedissonExpirableReactiv
public Publisher<Boolean> removeAll(Collection<?> c) {
return commandExecutor.evalWriteReactive(getName(), codec, new RedisCommand<Boolean>("EVAL", new BooleanReplayConvertor(), 4, ValueType.OBJECTS),
"local v = 0 " +
"for i = 0, table.getn(ARGV), 1 do "
"for i = 1, table.getn(ARGV), 1 do "
+ "if redis.call('zrem', KEYS[1], ARGV[i]) == 1 "
+ "then v = 1 end "
+"end "
@ -171,7 +171,7 @@ public class RedissonScoredSortedSetReactive<V> extends RedissonExpirableReactiv
+ "while i <= table.getn(s) do "
+ "local element = s[i] "
+ "local isInAgrs = false "
+ "for j = 0, table.getn(ARGV), 1 do "
+ "for j = 1, table.getn(ARGV), 1 do "
+ "if ARGV[j] == element then "
+ "isInAgrs = true "
+ "break "

@ -224,8 +224,8 @@ public class RedissonSetCacheReactive<V> extends RedissonExpirableReactive imple
public Publisher<Boolean> containsAll(Collection<?> c) {
return commandExecutor.evalReadReactive(getName(), codec, RedisCommands.EVAL_BOOLEAN_WITH_VALUES,
"local s = redis.call('hvals', KEYS[1]);" +
"for i = 0, table.getn(s), 1 do " +
"for j = 0, table.getn(ARGV), 1 do "
"for i = 1, table.getn(s), 1 do " +
"for j = 1, table.getn(ARGV), 1 do "
+ "if ARGV[j] == s[i] then "
+ "table.remove(ARGV, j) "
+ "end "

Loading…
Cancel
Save