K - Key type.V - Value type.public abstract class RedisCodec<K,V> extends Object
RedisCodec encodes keys and values sent to Redis, and decodes keys and values in the command output.
The methods are called by multiple threads and must be thread-safe.| Constructor and Description |
|---|
RedisCodec() |
| Modifier and Type | Method and Description |
|---|---|
abstract K |
decodeKey(ByteBuffer bytes)
Decode the key output by redis.
|
abstract V |
decodeValue(ByteBuffer bytes)
Decode the value output by redis.
|
abstract byte[] |
encodeKey(K key)
Encode the key for output to redis.
|
abstract byte[] |
encodeValue(V value)
Encode the value for output to redis.
|
public abstract K decodeKey(ByteBuffer bytes)
bytes - Raw bytes of the key.public abstract V decodeValue(ByteBuffer bytes)
bytes - Raw bytes of the value.public abstract byte[] encodeKey(K key)
key - Key.public abstract byte[] encodeValue(V value)
value - Value.Copyright © 2016. All rights reserved.