V
- The value typepublic abstract class CacheDeserializer<V>
extends java.lang.Object
CacheDeserializer
is used to deserialize a V
value from a N-length byte array.Constructor and Description |
---|
CacheDeserializer()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract V |
deserialize(byte[] serializedObject)
Deserialize a byte[] into a
V object. |
public abstract V deserialize(byte[] serializedObject) throws DeserializationException
V
object.
When implementing deserialize(byte[])
, wrap the deserialization logic in a try/catch
that rethrows any exception
as a DeserializationException
so that synchronous Cache
methods will rethrow the exception and
asynchronous CompletableFuture
will complete exceptionally.
serializedObject
- the serialized objectV
objectDeserializationException
- if an exception occurs during deserialization