K
- Key type.V
- Value type.public interface RedisCodec<K,V>
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.Modifier and Type | Method and Description |
---|---|
K |
decodeKey(ByteBuffer bytes)
Decode the key output by redis.
|
V |
decodeValue(ByteBuffer bytes)
Decode the value output by redis.
|
ByteBuffer |
encodeKey(K key)
Encode the key for output to redis.
|
ByteBuffer |
encodeValue(V value)
Encode the value for output to redis.
|
K decodeKey(ByteBuffer bytes)
bytes
- Raw bytes of the key.V decodeValue(ByteBuffer bytes)
bytes
- Raw bytes of the value.ByteBuffer encodeKey(K key)
key
- Key.ByteBuffer encodeValue(V value)
value
- Value.Copyright © 2016. All rights reserved.