Base serializer trait with serialization identifiers configuration contract,
when globally unique serialization identifier is configured in the reference.conf
.
This is a special Serializer that Serializes and deserializes byte arrays only, (just returns the byte array unchanged/uncopied)
Java API for creating a Serializer: make sure to include a constructor which takes exactly one argument of type akka.actor.ExtendedActorSystem, because that is the preferred constructor which will be invoked when reflectively instantiating the JSerializer (also possible with empty constructor).
This Serializer uses standard Java Serialization
This is a special Serializer that Serializes and deserializes nulls only
Serialization module.
Serialization module. Contains methods for serialization and deserialization as well as locating a Serializer for a particular class as defined in the mapping in the configuration.
A Serializer represents a bimap between an object and an array of bytes representing that object.
A Serializer represents a bimap between an object and an array of bytes representing that object.
Serializers are loaded using reflection during akka.actor.ActorSystem start-up, where two constructors are tried in order:
Be sure to always use the [[akka.actor.DynamicAccess]] for loading classes! This is necessary to avoid strange match errors and inequalities which arise from different class loaders loading the same class.
A Serializer represents a bimap between an object and an array of bytes representing that object.
A Serializer represents a bimap between an object and an array of bytes representing that object.
For serialization of data that need to evolve over time the SerializerWithStringManifest
is recommended instead
of Serializer because the manifest (type hint) is a String
instead of a Class
. That means
that the class can be moved/removed and the serializer can still deserialize old data by matching
on the String
. This is especially useful for Akka Persistence.
The manifest string can also encode a version number that can be used in #fromBinary to deserialize in different ways to migrate old data to new domain objects.
If the data was originally serialized with Serializer and in a later version of the
system you change to SerializerWithStringManifest
the manifest string will be the full class name if
you used includeManifest=true
, otherwise it will be the empty string.
Serializers are loaded using reflection during akka.actor.ActorSystem start-up, where two constructors are tried in order:
Be sure to always use the [[akka.actor.DynamicAccess]] for loading classes! This is necessary to avoid strange match errors and inequalities which arise from different class loaders loading the same class.
SerializationExtension is an Akka Extension to interact with the Serialization that is built into Akka