public class StringRedisSerializer extends Object implements RedisSerializer<String>
Useful when the interaction with the Redis happens mainly through Strings.
Does not perform any null conversion since empty strings are valid keys/values.
Constructor and Description |
---|
StringRedisSerializer() |
StringRedisSerializer(Charset charset) |
Modifier and Type | Method and Description |
---|---|
String |
deserialize(byte[] bytes)
Deserialize an object from the given binary data.
|
byte[] |
serialize(String string)
Serialize the given object to binary data.
|
public StringRedisSerializer()
public StringRedisSerializer(Charset charset)
public String deserialize(byte[] bytes)
RedisSerializer
deserialize
in interface RedisSerializer<String>
bytes
- object binary representationpublic byte[] serialize(String string)
RedisSerializer
serialize
in interface RedisSerializer<String>
string
- object to serializeCopyright © 2011-2016–2016 Pivotal Software, Inc.. All rights reserved.