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 newRedisElementReaderusing givenRedisSerializer.read(ByteBuffer buffer) Deserialize aByteBufferinto the according type.
-
Method Details
-
read
Deserialize aByteBufferinto the according type.- Parameters:
buffer- must not be null.- Returns:
- the deserialized value. Can be null.
-
from
Create newRedisElementReaderusing givenRedisSerializer.- Parameters:
serializer- must not be null.- Returns:
- new instance of
RedisElementReader.
-