public class PseudoSerializerFactory extends java.lang.Object implements SerializerFactory
SerializerFactory
is not a real factory since it only provides a given instance instead of dynamically creating new serializers. It can
be used when all types should be serialized by the same serializer. This also allows serializers to be shared among different
Kryo instances.| Modifier and Type | Field and Description |
|---|---|
private Serializer<?> |
serializer |
| Constructor and Description |
|---|
PseudoSerializerFactory(Serializer<?> serializer) |
| Modifier and Type | Method and Description |
|---|---|
Serializer |
makeSerializer(Kryo kryo,
java.lang.Class<?> type)
Creates a new serializer
|
private final Serializer<?> serializer
public PseudoSerializerFactory(Serializer<?> serializer)
public Serializer makeSerializer(Kryo kryo, java.lang.Class<?> type)
SerializerFactorymakeSerializer in interface SerializerFactorykryo - The serializer instance requesting the new serializer.type - The type of the object that is to be serialized.type.