Package com.tangosol.io
Interface SerializationSupport
- All Known Implementing Classes:
PortableException
,RequestIncompleteException
,RequestPolicyException
,RequestTimeoutException
,ScriptAggregator
public interface SerializationSupport
The SerializationSupport interface provides the ability for objects that are
serialized by any
Serializer
to affect the initial stage of serialization
and the final stage of deserialization.
The semantics of this interface's methods are identical to the
writeReplace
and readResolve
pseudo-interface methods
defined by the Serializable
interface.
This interface provides trivial implementations of both methods to allow implementors to override only the necessary one.
- Since:
- Coherence 12.2.1
- Author:
- as,gg 2014.12.22
-
Method Details
-
writeReplace
Designate an alternative object to be used when writing an object to the buffer.This method is invoked by the
Serializer
if the object implementsSerializationSupport
interface.- Returns:
- an object which state should be written instead of the original one
- Throws:
ObjectStreamException
-
readResolve
Designate a replacement for an object after an instance of it is read from the buffer.This method is invoked by the
Serializer
if the object implementsSerializationSupport
interface.- Returns:
- an object that should be returned instead of the deserialized one
- Throws:
ObjectStreamException
-