|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lambdaworks.redis.codec.RedisCodec<K,V>
K - Key type.V - Value type.public abstract class RedisCodec<K,V>
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.
| Constructor Summary | |
|---|---|
RedisCodec()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RedisCodec()
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||