Package com.scaleout.client.caching
Class CacheDeserializer<V>
java.lang.Object
com.scaleout.client.caching.CacheDeserializer<V>
- Type Parameters:
V
- The value type
- Direct Known Subclasses:
CacheValueDeserializer
The
CacheDeserializer
is used to deserialize a V
value from a N-length byte array.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract V
deserialize
(byte[] serializedObject) Deserialize a byte[] into aV
object.
-
Constructor Details
-
CacheDeserializer
public CacheDeserializer()Default constructor.
-
-
Method Details
-
deserialize
Deserialize a byte[] into aV
object.When implementing
deserialize(byte[])
, wrap the deserialization logic in atry/catch
that rethrows any exception as aDeserializationException
so that synchronousCache
methods will rethrow the exception and asynchronousCompletableFuture
will complete exceptionally.- Parameters:
serializedObject
- the serialized object- Returns:
- a
V
object - Throws:
DeserializationException
- if an exception occurs during deserialization
-