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) { public Future<Integer> lexCountTailAsync(String fromElement, boolean fromInclusive) {
String fromValue = value(fromElement, 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 @Override
@ -159,7 +159,7 @@ public class RedissonLexSortedSet extends RedissonScoredSortedSet<String> implem
public Future<Integer> lexCountHeadAsync(String toElement, boolean toInclusive) { public Future<Integer> lexCountHeadAsync(String toElement, boolean toInclusive) {
String toValue = value(toElement, 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 @Override
@ -172,7 +172,7 @@ public class RedissonLexSortedSet extends RedissonScoredSortedSet<String> implem
String fromValue = value(fromElement, fromInclusive); String fromValue = value(fromElement, fromInclusive);
String toValue = value(toElement, toInclusive); 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) { private String value(String fromElement, boolean fromInclusive) {
@ -187,7 +187,7 @@ public class RedissonLexSortedSet extends RedissonScoredSortedSet<String> implem
@Override @Override
public Future<Boolean> addAsync(String e) { 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 @Override
@ -197,7 +197,7 @@ public class RedissonLexSortedSet extends RedissonScoredSortedSet<String> implem
params.add(0); params.add(0);
params.add(param); 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 @Override

@ -101,14 +101,14 @@ public class RedissonLexSortedSetReactive extends RedissonScoredSortedSetReactiv
public Publisher<Integer> lexCountTail(String fromElement, boolean fromInclusive) { public Publisher<Integer> lexCountTail(String fromElement, boolean fromInclusive) {
String fromValue = value(fromElement, 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 @Override
public Publisher<Integer> lexCountHead(String toElement, boolean toInclusive) { public Publisher<Integer> lexCountHead(String toElement, boolean toInclusive) {
String toValue = value(toElement, 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 @Override
@ -116,7 +116,7 @@ public class RedissonLexSortedSetReactive extends RedissonScoredSortedSetReactiv
String fromValue = value(fromElement, fromInclusive); String fromValue = value(fromElement, fromInclusive);
String toValue = value(toElement, toInclusive); 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) { private String value(String fromElement, boolean fromInclusive) {
@ -131,7 +131,7 @@ public class RedissonLexSortedSetReactive extends RedissonScoredSortedSetReactiv
@Override @Override
public Publisher<Long> add(String e) { 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 @Override
@ -141,7 +141,7 @@ public class RedissonLexSortedSetReactive extends RedissonScoredSortedSetReactiv
params.add(0); params.add(0);
params.add(param); 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