}
this.versionedHeader = out.toBytes();
}
public Kryo createKryo() {
final Kryo kryo = new Kryo(new GremlinClassResolver(), new MapReferenceResolver(), new DefaultStreamFactory());
kryo.addDefaultSerializer(Map.Entry.class, new EntrySerializer());
kryo.setRegistrationRequired(true);
serializationList.forEach(p -> {
final Function<Kryo, Serializer> serializer = p.getValue1();
if (serializer == null)
kryo.register(p.getValue0(), kryo.getDefaultSerializer(p.getValue0()), p.getValue2());
else
kryo.register(p.getValue0(), serializer.apply(kryo), p.getValue2());
});
return kryo;
}