public interface DataHandler
StringHandler
to encode the keys and values in UTF-8.| Modifier and Type | Method and Description |
|---|---|
Object |
deserialize(Object metaData,
byte[] b,
int offset,
int len,
ServerInfo serverInfo)
de-serialize value
|
void |
serialize(Object data,
Object metaData,
CompressibleByteArrayOutputStream op,
ServerInfo serverInfo)
Serialze value
|
void serialize(Object data, Object metaData, CompressibleByteArrayOutputStream op, ServerInfo serverInfo) throws IOException
data - Data to serializemetaData - Additional Info to serialize if required by the handler like the Object Class for example.
Pass null if the Data Handler does not require addtional info.op - An output stream which can automatically compress the data in a session if it crosses a configured.
Compression ThresholdserverInfo - Redis ServerInfo containing the Redis Server detailsIOException - If there is an error during serializationObject deserialize(Object metaData, byte[] b, int offset, int len, ServerInfo serverInfo) throws IOException
metaData - Additional Info to de-serialize if required by the handlerb - Byte Array containing the data from the Redis Serveroffset - Starting offset of the datalen - Length of the data in bytesserverInfo - Redis ServerInfo containing the Redis Server detailsIOException - If there is an error during de-serializationCopyright © 2013- Suresh Mahalingam. All Rights Reserved.