public interface PofSerializer<T>
In order to support hot-deploying containers, it is important in the case of a PofSerializer implementation that requires ClassLoader context that it not hold any strong references to that ClassLoader, or to any Class objects obtained from that ClassLoader.
Note:<b/> it is extremely important that objects that are equivalent according to their "equals()" implementation produce equivalent serialized streams. Violating this relationship will result in non-deterministic behavior for many Coherence services.
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(PofReader in)
Deserialize a user type instance from a POF stream by reading its state using the specified PofReader object.
|
void |
serialize(PofWriter out, T value)
Serialize a user type instance to a POF stream by writing its state using the specified PofWriter object.
|
void serialize(PofWriter out, T value) throws IOException
An implementation of PofSerializer is required to follow the following steps in sequence for writing out an object of a user type:
PofWriter.setVersionId(int).PofWriter.writeRemainder(com.tangosol.util.Binary).out - the PofWriter with which to write the object's statevalue - the object to serializeIOException - if an I/O error occursT deserialize(PofReader in) throws IOException
An implementation of PofSerializer is required to follow the following steps in sequence for reading in an object of a user type:
PofReader.getVersionId().PofReader.registerIdentity(java.lang.Object) with the new instance prior to reading any properties which are user type instances themselves.PofReader.readRemainder().in - the PofReader with which to read the object's stateIOException - if an I/O error occurs