PekkoSerializer

play.api.cache.redis.connector.PekkoSerializer

Provides a encode and decode methods to serialize objects into strings and vise versa.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def decode[T : ClassTag](value: String): Try[T]

Method accepts a valid serialized string and based on the accepted class it deserializes it. If the expected class does not match expectations, deserialization fails with an exception. Also, if the string is not valid representation, it also fails.

Method accepts a valid serialized string and based on the accepted class it deserializes it. If the expected class does not match expectations, deserialization fails with an exception. Also, if the string is not valid representation, it also fails.

Type parameters

T

expected class

Value parameters

value

valid serialized entity

Attributes

Returns

deserialized object or exception

def encode(value: Any): Try[String]

Method accepts a value to be serialized into the string. Based on the implementation, it returns a string representing the value or provides an exception, if the computation fails.

Method accepts a value to be serialized into the string. Based on the implementation, it returns a string representing the value or provides an exception, if the computation fails.

Value parameters

value

value to be serialized

Attributes

Returns

serialized string or exception