diff --git a/src/main/java/org/redisson/codec/RedissonCodec.java b/src/main/java/org/redisson/codec/RedissonCodec.java index f33e12e0a..f96be8eae 100644 --- a/src/main/java/org/redisson/codec/RedissonCodec.java +++ b/src/main/java/org/redisson/codec/RedissonCodec.java @@ -4,40 +4,12 @@ import java.nio.ByteBuffer; public interface RedissonCodec { - /** - * Decode the key output by redis. - * - * @param bytes Raw bytes of the key. - * - * @return The decoded key. - */ - public abstract Object decodeKey(ByteBuffer bytes); + Object decodeKey(ByteBuffer bytes); - /** - * Decode the value output by redis. - * - * @param bytes Raw bytes of the value. - * - * @return The decoded value. - */ - public abstract Object decodeValue(ByteBuffer bytes); + Object decodeValue(ByteBuffer bytes); - /** - * Encode the key for output to redis. - * - * @param key Key. - * - * @return The encoded key. - */ - public abstract byte[] encodeKey(Object key); + byte[] encodeKey(Object key); - /** - * Encode the value for output to redis. - * - * @param value Value. - * - * @return The encoded value. - */ - public abstract byte[] encodeValue(Object value); + byte[] encodeValue(Object value); } diff --git a/src/main/java/org/redisson/codec/StreamCodec.java b/src/main/java/org/redisson/codec/SerializationCodec.java similarity index 95% rename from src/main/java/org/redisson/codec/StreamCodec.java rename to src/main/java/org/redisson/codec/SerializationCodec.java index 7d49a05e2..6fc9239e8 100644 --- a/src/main/java/org/redisson/codec/StreamCodec.java +++ b/src/main/java/org/redisson/codec/SerializationCodec.java @@ -6,7 +6,7 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.nio.ByteBuffer; -public class StreamCodec implements RedissonCodec { +public class SerializationCodec implements RedissonCodec { @Override public Object decodeKey(ByteBuffer bytes) {