public class PseudoSerializerFactory extends 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.Constructor and Description |
---|
PseudoSerializerFactory(Serializer<?> serializer) |
Modifier and Type | Method and Description |
---|---|
Serializer |
makeSerializer(Kryo kryo,
Class<?> type)
Creates a new serializer
|
public PseudoSerializerFactory(Serializer<?> serializer)
public Serializer makeSerializer(Kryo kryo, Class<?> type)
SerializerFactory
makeSerializer
in interface SerializerFactory
kryo
- The serializer instance requesting the new serializer.type
- The type of the object that is to be serialized.type
.Copyright © 2018. All rights reserved.