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>
A
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:
- Register just the custom class with a
nullSerializerimplementation - Register the custom class with a
Serializerimplementation -
Register the custom class with a
Function<Kryo, Serializer>for those cases where theSerializerrequires theKryoinstance 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 -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic GryoMapper.Builderbuild()org.apache.tinkerpop.shaded.kryo.KryoCreate a new instance of the internal object mapper that an implementation represents.List<TypeRegistration<?>>
-
Field Details
-
GIO
public static final byte[] GIO -
HEADER
public static final byte[] HEADER
-
-
Method Details
-
createMapper
public org.apache.tinkerpop.shaded.kryo.Kryo createMapper()Description copied from interface:MapperCreate a new instance of the internal object mapper that an implementation represents.- Specified by:
createMapperin interfaceMapper<org.apache.tinkerpop.shaded.kryo.Kryo>
-
getVersion
-
getRegisteredClasses
-
getTypeRegistrations
-
build
-