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 anySerializer
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
andreadResolve
pseudo-interface methods defined by theSerializable
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 Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Object
readResolve()
Designate a replacement for an object after an instance of it is read from the buffer.default Object
writeReplace()
Designate an alternative object to be used when writing an object to the buffer.
-
-
-
Method Detail
-
writeReplace
default Object writeReplace() throws ObjectStreamException
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
default Object readResolve() throws ObjectStreamException
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
-
-