Class AbstractGryoClassResolver

  • All Implemented Interfaces:
    org.apache.tinkerpop.shaded.kryo.ClassResolver
    Direct Known Subclasses:
    GryoClassResolverV1d0, GryoClassResolverV3d0

    public abstract class AbstractGryoClassResolver
    extends Object
    implements org.apache.tinkerpop.shaded.kryo.ClassResolver
    This mapper implementation of the ClassResolver helps ensure that all Vertex and Edge concrete classes get properly serialized and deserialized by stripping them of their concrete class name so that they are treated generically. See the getRegistration(Class) method for the core of this logic.
    Author:
    Stephen Mallette (http://stephen.genoprime.com)
    • Field Detail

      • kryo

        protected org.apache.tinkerpop.shaded.kryo.Kryo kryo
      • idToRegistration

        protected final org.apache.tinkerpop.shaded.kryo.util.IntMap<org.apache.tinkerpop.shaded.kryo.Registration> idToRegistration
      • classToRegistration

        protected final org.apache.tinkerpop.shaded.kryo.util.ObjectMap<Class,​org.apache.tinkerpop.shaded.kryo.Registration> classToRegistration
      • classToNameId

        protected org.apache.tinkerpop.shaded.kryo.util.IdentityObjectIntMap<Class> classToNameId
      • nameIdToClass

        protected org.apache.tinkerpop.shaded.kryo.util.IntMap<Class> nameIdToClass
      • nameToClass

        protected org.apache.tinkerpop.shaded.kryo.util.ObjectMap<String,​Class> nameToClass
      • nextNameId

        protected int nextNameId
    • Constructor Detail

      • AbstractGryoClassResolver

        public AbstractGryoClassResolver()
    • Method Detail

      • setKryo

        public void setKryo​(org.apache.tinkerpop.shaded.kryo.Kryo kryo)
        Specified by:
        setKryo in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
      • register

        public org.apache.tinkerpop.shaded.kryo.Registration register​(org.apache.tinkerpop.shaded.kryo.Registration registration)
        Specified by:
        register in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
      • registerImplicit

        public org.apache.tinkerpop.shaded.kryo.Registration registerImplicit​(Class type)
        Specified by:
        registerImplicit in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
      • getRegistration

        public org.apache.tinkerpop.shaded.kryo.Registration getRegistration​(Class clazz)
        Specified by:
        getRegistration in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
      • getRegistration

        public org.apache.tinkerpop.shaded.kryo.Registration getRegistration​(int classID)
        Specified by:
        getRegistration in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
      • writeClass

        public org.apache.tinkerpop.shaded.kryo.Registration writeClass​(org.apache.tinkerpop.shaded.kryo.io.Output output,
                                                                        Class type)
        Specified by:
        writeClass in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
      • writeName

        protected void writeName​(org.apache.tinkerpop.shaded.kryo.io.Output output,
                                 Class type)
      • readClass

        public org.apache.tinkerpop.shaded.kryo.Registration readClass​(org.apache.tinkerpop.shaded.kryo.io.Input input)
        Specified by:
        readClass in interface org.apache.tinkerpop.shaded.kryo.ClassResolver
      • readName

        protected org.apache.tinkerpop.shaded.kryo.Registration readName​(org.apache.tinkerpop.shaded.kryo.io.Input input)
      • getTypeByName

        protected Class<?> getTypeByName​(String className)
      • reset

        public void reset()
        Specified by:
        reset in interface org.apache.tinkerpop.shaded.kryo.ClassResolver