Class GryoMapper
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.structure.io.gryo.GryoMapper
-
- All Implemented Interfaces:
Mapper<org.apache.tinkerpop.shaded.kryo.Kryo>
public final class GryoMapper extends Object implements Mapper<org.apache.tinkerpop.shaded.kryo.Kryo>
AMapper
implementation for Kryo. This implementation requires that all classes to be serialized by Kryo are registered to it.Graph
implementations providing anIoRegistry
should register their custom classes and/or serializers in one of three ways:- Register just the custom class with a
null
Serializer
implementation - Register the custom class with a
Serializer
implementation -
Register the custom class with a
Function<Kryo, Serializer>
for those cases where theSerializer
requires theKryo
instance to get constructed.
public class MyGraphIoRegistry extends AbstractIoRegistry { public MyGraphIoRegistry() { register(GryoIo.class, MyGraphIdClass.class, new MyGraphIdSerializer()); } }
- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GryoMapper.Builder
A builder to construct aGryoMapper
instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GryoMapper.Builder
build()
org.apache.tinkerpop.shaded.kryo.Kryo
createMapper()
Create a new instance of the internal object mapper that an implementation represents.List<Class>
getRegisteredClasses()
List<TypeRegistration<?>>
getTypeRegistrations()
GryoVersion
getVersion()
-
-
-
Method Detail
-
createMapper
public org.apache.tinkerpop.shaded.kryo.Kryo createMapper()
Description copied from interface:Mapper
Create a new instance of the internal object mapper that an implementation represents.- Specified by:
createMapper
in interfaceMapper<org.apache.tinkerpop.shaded.kryo.Kryo>
-
getVersion
public GryoVersion getVersion()
-
getTypeRegistrations
public List<TypeRegistration<?>> getTypeRegistrations()
-
build
public static GryoMapper.Builder build()
-
-