From 4468e8a792989e9f49d8da7de1b9db552b5b56ab Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 4 Jun 2015 10:16:21 +0200 Subject: [PATCH] Improve codecs #70 --- src/main/java/com/lambdaworks/redis/RedisClient.java | 3 +-- src/main/java/com/lambdaworks/redis/codec/RedisCodec.java | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/lambdaworks/redis/RedisClient.java b/src/main/java/com/lambdaworks/redis/RedisClient.java index 44348f9252..8a4eae4dc4 100644 --- a/src/main/java/com/lambdaworks/redis/RedisClient.java +++ b/src/main/java/com/lambdaworks/redis/RedisClient.java @@ -28,7 +28,6 @@ */ public class RedisClient extends AbstractRedisClient { - private final RedisCodec codec = newStringStringCodec(); private final RedisURI redisURI; /** @@ -336,7 +335,7 @@ private void connectAsync(CommandHandler handler, RedisAsyncConnect * @return A new connection. */ public RedisPubSubConnection connectPubSub() { - return connectPubSub(codec); + return connectPubSub(newStringStringCodec()); } /** diff --git a/src/main/java/com/lambdaworks/redis/codec/RedisCodec.java b/src/main/java/com/lambdaworks/redis/codec/RedisCodec.java index 10ba4d6fd3..ef694c5d59 100644 --- a/src/main/java/com/lambdaworks/redis/codec/RedisCodec.java +++ b/src/main/java/com/lambdaworks/redis/codec/RedisCodec.java @@ -5,11 +5,9 @@ import java.nio.ByteBuffer; /** - * A RedisCodec encodes keys and values sent to redis, and decodes keys - * and values in the command output. + * A RedisCodec encodes keys and values sent to redis, and decodes keys and values in the command output. * - * The encode methods will be called by multiple threads and must be thread-safe, - * however the decode methods will only be called by one thread. + * The methods will be called by multiple threads and must be thread-safe. * * @param Key type. * @param Value type.