Interface RedisElementReader<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy interface that specifies a deserializer that can deserialize a binary element representation stored in Redis
into an object.
- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> RedisElementReader<T>
from
(RedisSerializer<T> serializer) Create newRedisElementReader
using givenRedisSerializer
.read
(ByteBuffer buffer) Deserialize aByteBuffer
into the according type.
-
Method Details
-
read
Deserialize aByteBuffer
into the according type.- Parameters:
buffer
- must not be null.- Returns:
- the deserialized value. Can be null.
-
from
Create newRedisElementReader
using givenRedisSerializer
.- Parameters:
serializer
- must not be null.- Returns:
- new instance of
RedisElementReader
.
-