public class ByteArrayCodec extends Object implements RedisCodec<byte[],byte[]>
RedisCodec
that uses plain byte arrays.Modifier and Type | Field and Description |
---|---|
static ByteArrayCodec |
INSTANCE |
Constructor and Description |
---|
ByteArrayCodec() |
Modifier and Type | Method and Description |
---|---|
byte[] |
decodeKey(ByteBuffer bytes)
Decode the key output by redis.
|
byte[] |
decodeValue(ByteBuffer bytes)
Decode the value output by redis.
|
ByteBuffer |
encodeKey(byte[] key)
Encode the key for output to redis.
|
ByteBuffer |
encodeValue(byte[] value)
Encode the value for output to redis.
|
public static final ByteArrayCodec INSTANCE
public byte[] decodeKey(ByteBuffer bytes)
RedisCodec
decodeKey
in interface RedisCodec<byte[],byte[]>
bytes
- Raw bytes of the key, must not be null.public byte[] decodeValue(ByteBuffer bytes)
RedisCodec
decodeValue
in interface RedisCodec<byte[],byte[]>
bytes
- Raw bytes of the value, must not be null.public ByteBuffer encodeKey(byte[] key)
RedisCodec
encodeKey
in interface RedisCodec<byte[],byte[]>
key
- the key, may be null.public ByteBuffer encodeValue(byte[] value)
RedisCodec
encodeValue
in interface RedisCodec<byte[],byte[]>
value
- the value, may be null.Copyright © 2018 lettuce.io. All rights reserved.