RedissonLexSortedSet non string codec can't be used.

pull/365/head
Nikita 9 years ago
parent ae72c05b93
commit cbb35e707e

@ -147,7 +147,7 @@ public class RedissonLexSortedSet extends RedissonScoredSortedSet<String> implem
public Future<Integer> lexCountTailAsync(String fromElement, boolean fromInclusive) {
String fromValue = value(fromElement, fromInclusive);
return commandExecutor.readAsync(getName(), RedisCommands.ZLEXCOUNT, getName(), fromValue, "+");
return commandExecutor.readAsync(getName(), StringCodec.INSTANCE, RedisCommands.ZLEXCOUNT, getName(), fromValue, "+");
}
@Override
@ -159,7 +159,7 @@ public class RedissonLexSortedSet extends RedissonScoredSortedSet<String> implem
public Future<Integer> lexCountHeadAsync(String toElement, boolean toInclusive) {
String toValue = value(toElement, toInclusive);
return commandExecutor.readAsync(getName(), RedisCommands.ZLEXCOUNT, getName(), "-", toValue);
return commandExecutor.readAsync(getName(), StringCodec.INSTANCE, RedisCommands.ZLEXCOUNT, getName(), "-", toValue);
}
@Override
@ -172,7 +172,7 @@ public class RedissonLexSortedSet extends RedissonScoredSortedSet<String> implem
String fromValue = value(fromElement, fromInclusive);
String toValue = value(toElement, toInclusive);
return commandExecutor.readAsync(getName(), RedisCommands.ZLEXCOUNT, getName(), fromValue, toValue);
return commandExecutor.readAsync(getName(), StringCodec.INSTANCE, RedisCommands.ZLEXCOUNT, getName(), fromValue, toValue);
}
private String value(String fromElement, boolean fromInclusive) {
@ -187,7 +187,7 @@ public class RedissonLexSortedSet extends RedissonScoredSortedSet<String> implem
@Override
public Future<Boolean> addAsync(String e) {
return commandExecutor.writeAsync(getName(), codec, RedisCommands.ZADD_BOOL_RAW, getName(), 0, e);
return commandExecutor.writeAsync(getName(), StringCodec.INSTANCE, RedisCommands.ZADD_BOOL_RAW, getName(), 0, e);
}
@Override
@ -197,7 +197,7 @@ public class RedissonLexSortedSet extends RedissonScoredSortedSet<String> implem
params.add(0);
params.add(param);
}
return commandExecutor.writeAsync(getName(), codec, RedisCommands.ZADD_BOOL_RAW, getName(), params.toArray());
return commandExecutor.writeAsync(getName(), StringCodec.INSTANCE, RedisCommands.ZADD_BOOL_RAW, getName(), params.toArray());
}
@Override

@ -101,14 +101,14 @@ public class RedissonLexSortedSetReactive extends RedissonScoredSortedSetReactiv
public Publisher<Integer> lexCountTail(String fromElement, boolean fromInclusive) {
String fromValue = value(fromElement, fromInclusive);
return commandExecutor.readReactive(getName(), RedisCommands.ZLEXCOUNT, getName(), fromValue, "+");
return commandExecutor.readReactive(getName(), StringCodec.INSTANCE, RedisCommands.ZLEXCOUNT, getName(), fromValue, "+");
}
@Override
public Publisher<Integer> lexCountHead(String toElement, boolean toInclusive) {
String toValue = value(toElement, toInclusive);
return commandExecutor.readReactive(getName(), RedisCommands.ZLEXCOUNT, getName(), "-", toValue);
return commandExecutor.readReactive(getName(), StringCodec.INSTANCE, RedisCommands.ZLEXCOUNT, getName(), "-", toValue);
}
@Override
@ -116,7 +116,7 @@ public class RedissonLexSortedSetReactive extends RedissonScoredSortedSetReactiv
String fromValue = value(fromElement, fromInclusive);
String toValue = value(toElement, toInclusive);
return commandExecutor.readReactive(getName(), RedisCommands.ZLEXCOUNT, getName(), fromValue, toValue);
return commandExecutor.readReactive(getName(), StringCodec.INSTANCE, RedisCommands.ZLEXCOUNT, getName(), fromValue, toValue);
}
private String value(String fromElement, boolean fromInclusive) {
@ -131,7 +131,7 @@ public class RedissonLexSortedSetReactive extends RedissonScoredSortedSetReactiv
@Override
public Publisher<Long> add(String e) {
return commandExecutor.writeReactive(getName(), codec, RedisCommands.ZADD_RAW, getName(), 0, e);
return commandExecutor.writeReactive(getName(), StringCodec.INSTANCE, RedisCommands.ZADD_RAW, getName(), 0, e);
}
@Override
@ -141,7 +141,7 @@ public class RedissonLexSortedSetReactive extends RedissonScoredSortedSetReactiv
params.add(0);
params.add(param);
}
return commandExecutor.writeReactive(getName(), codec, RedisCommands.ZADD_RAW, getName(), params.toArray());
return commandExecutor.writeReactive(getName(), StringCodec.INSTANCE, RedisCommands.ZADD_RAW, getName(), params.toArray());
}
}

Loading…
Cancel
Save