eval commands

pull/243/head
Nikita 10 years ago
parent 0e7c7c7edc
commit 3204255277

@ -20,6 +20,7 @@ import java.util.Arrays;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
import io.netty.util.CharsetUtil;
public class RedisEncoder extends MessageToByteEncoder<RedisData<Object, Object>> {
@ -51,8 +52,8 @@ public class RedisEncoder extends MessageToByteEncoder<RedisData<Object, Object>
i++;
}
// String o = out.toString(CharsetUtil.UTF_8);
// System.out.println(o);
String o = out.toString(CharsetUtil.UTF_8);
System.out.println(o);
}
private void writeArgument(ByteBuf out, byte[] arg) {

@ -29,6 +29,13 @@ import org.redisson.client.protocol.pubsub.PubSubStatusMessage;
public interface RedisCommands {
RedisStrictCommand<Boolean> EVAL_BOOLEAN = new RedisStrictCommand<Boolean>("EVAL", new BooleanReplayConvertor());
RedisStrictCommand<Long> EVAL_INTEGER = new RedisStrictCommand<Long>("EVAL");
RedisStrictCommand<Long> INCR = new RedisStrictCommand<Long>("INCR");
RedisStrictCommand<Long> INCRBY = new RedisStrictCommand<Long>("INCRBY");
RedisStrictCommand<Long> DECR = new RedisStrictCommand<Long>("DECR");
RedisStrictCommand<String> AUTH = new RedisStrictCommand<String>("AUTH", new StringReplayDecoder());
RedisStrictCommand<String> SELECT = new RedisStrictCommand<String>("SELECT", new StringReplayDecoder());
RedisStrictCommand<String> CLIENT_SETNAME = new RedisStrictCommand<String>("CLIENT", "SETNAME", new StringReplayDecoder());

@ -22,6 +22,8 @@ import io.netty.util.CharsetUtil;
public class StringCodec implements Codec {
public static final StringCodec INSTANCE = new StringCodec();
@Override
public byte[] encode(int paramIndex, Object in) {
try {

Loading…
Cancel
Save