Called AFTER deserialization, providing our own replacement.
Called AFTER deserialization, providing our own replacement. This is what allows us to provide a non-null value for the constructor parameter obj.
an object to replace this one after deserialization.
Converts any object into a java.io.Serializable object by using twitter chill (and hence kryo) under the hood.
the type of object to serialize