T
- The type to be serialized.public class JavaSerializer<T>
extends com.esotericsoftware.kryo.Serializer<T>
JavaSerializer
, that additionally makes sure the ObjectInputStream
used for deserialization specifically uses Kryo's registered classloader.
Flink maintains this reimplementation due to a known issue with Kryo's JavaSerializer
,
in which the wrong classloader may be used for deserialization, leading to ClassNotFoundException
s.
Constructor and Description |
---|
JavaSerializer() |
Modifier and Type | Method and Description |
---|---|
T |
read(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Input input,
Class aClass) |
void |
write(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Output output,
T o) |
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.