6.3. Using the Externalizable API
6.3.1. The Externalizable API Usage
JBoss Data Grid uses JBoss Marshalling to serialize objects.
Serialized classes require a corresponding Externalizer interface implementation that is configured to:
- Transform an object class into a serialized class
- Read an object class from an output.
Use a separate class to implement the Externalizer interface. Externalizer implementations control how objects of a class are created when reading an object from a stream.
The
readObject()
implementations create object instances of the target class. This provides flexibility in the creation of instances and allows target classes to persist immutably.
Note
It is recommended that Externalizer implementations are stored within classes that they externalize as inner static public classes.