public final class GryoMapper extends Object implements Mapper<Kryo>
Mapper
implementation for Kryo. This implementation requires that all classes to be serialized by
Kryo are registered to it.
Graph
implementations providing an IoRegistry
should register their custom classes and/or
serializers in one of three ways:
null
Serializer
implementationSerializer
implementationFunction<Kryo, Serializer>
for those cases where the
Serializer
requires the Kryo
instance to get constructed.
public class MyGraphIoRegistry extends AbstractIoRegistry {
public MyGraphIoRegistry() {
register(GryoIo.class, MyGraphIdClass.class, new MyGraphIdSerializer());
}
}
Modifier and Type | Class and Description |
---|---|
static class |
GryoMapper.Builder
A builder to construct a
GryoMapper instance. |
Modifier and Type | Method and Description |
---|---|
static GryoMapper.Builder |
build() |
Kryo |
createMapper()
Create a new instance of the internal object mapper that an implementation represents.
|
List<Class> |
getRegisteredClasses() |
List<TypeRegistration<?>> |
getTypeRegistrations() |
GryoVersion |
getVersion() |
public Kryo createMapper()
Mapper
createMapper
in interface Mapper<Kryo>
public GryoVersion getVersion()
public List<TypeRegistration<?>> getTypeRegistrations()
public static GryoMapper.Builder build()
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.