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, must not be null.V decodeValue(ByteBuffer bytes)
bytes
- Raw bytes of the value, must not be null.ByteBuffer encodeKey(K key)
key
- the key, may be null.ByteBuffer encodeValue(V value)
value
- the value, may be null.Copyright © 2018 lettuce.io. All rights reserved.