Kryo requires zero-argument-constructor. If no, then Instantiator should be set for specific class or all classes(bad practice).
When serializing lambda, Closure.class and SerializedLambda.clss should be registered. The functional interface should extend Serializable.
and because SerializedLambda doesn’t have zero-argument-constructor, so Objenesis(Include in kryo).MagicInstantiator or kryo.setInstantiatorStrategy(new StdInstantiatorStrategy());should be used.
reference is used to resolve cyclic ref and reduce same ref object ’s. if set true. then every object will have 1 byte to indicate whether it is ref or original object.
writeClassAndObject will write class info, then deserialize won’t require explicitly specify class info to succeed.
writeObject and readObject will need the class info to succeed.
custom serializer can be registered to do inter-laguage serialization.
{NAME+CLASS_NAME|ID}{REF|FIRST+Object_serialization}