public static interface RedisSerializationContext.SerializationPair<T>
static <T> RedisSerializationContext.SerializationPair<T> fromSerializer(RedisSerializer<T> serializer)
RedisSerializationContext.SerializationPair
adapter given RedisSerializer
.serializer
- must not be null.RedisSerializationContext.SerializationPair
adapter for RedisSerializer
.static <T> RedisSerializationContext.SerializationPair<T> just(RedisElementReader<? extends T> reader, RedisElementWriter<? extends T> writer)
RedisSerializationContext.SerializationPair
adapter given RedisElementReader
and RedisElementWriter
.reader
- must not be null.writer
- must not be null.RedisSerializationContext.SerializationPair
encapsulating RedisElementReader
and RedisElementWriter
.@Deprecated static <T> RedisSerializationContext.SerializationPair<T> raw()
byteArray()
or byteBuffer()
.RedisSerializationContext.SerializationPair
to pass-thru ByteBuffer
objects.RedisSerializationContext.SerializationPair
.static RedisSerializationContext.SerializationPair<byte[]> byteArray()
RedisSerializationContext.SerializationPair
to pass-thru byte
objects.RedisSerializationContext.SerializationPair
.static RedisSerializationContext.SerializationPair<ByteBuffer> byteBuffer()
RedisSerializationContext.SerializationPair
to pass-thru ByteBuffer
objects.RedisSerializationContext.SerializationPair
.RedisElementReader<T> getReader()
RedisElementReader
.default T read(ByteBuffer buffer)
ByteBuffer
into the according type.buffer
- must not be null.RedisElementWriter<T> getWriter()
RedisElementWriter
.default ByteBuffer write(T element)
element
to its ByteBuffer
representation.element
- ByteBuffer
representing element
in its binary form.Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.