com.esotericsoftware.kryo.factories.SerializerFactory Java Examples
The following examples show how to use
com.esotericsoftware.kryo.factories.SerializerFactory.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PropertyUserSerializer.java From subzero with Apache License 2.0 | 5 votes |
private void registerDefaultSerializer(Kryo kryo) { if (defaultSerializerClass != null || !serializerConfigurers.isEmpty()) { Class<? extends Serializer> serializerClass = defaultSerializerClass == null ? FieldSerializer.class : defaultSerializerClass; SerializerFactory serializerFactory = new ReflectionSerializerFactory(serializerClass); if (!serializerConfigurers.isEmpty()) { SerializerConfigurer configurer = serializerConfigurers.get(0); serializerFactory = new PostProcessingSerializerFactory(serializerFactory, configurer); } kryo.setDefaultSerializer(serializerFactory); } }
Example #2
Source File: PostProcessingSerializerFactory.java From subzero with Apache License 2.0 | 4 votes |
public PostProcessingSerializerFactory(SerializerFactory delegate, SerializerConfigurer configurer) { this.delegate = delegate; this.configurer = configurer; }