org.apache.tinkerpop.gremlin.structure.io.gryo

## Class AbstractGryoClassResolver

- java.lang.Object
- - org.apache.tinkerpop.gremlin.structure.io.gryo.AbstractGryoClassResolver

- Direct Known Subclasses:
    GryoClassResolverV1d0, GryoClassResolverV3d0

      public abstract class AbstractGryoClassResolver
      extends Object

  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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected <any>` | `classToNameId`
    `protected <any>` | `classToRegistration`
    `protected <any>` | `idToRegistration`
    `protected Kryo` | `kryo`
    `static byte` | `NAME`
    `protected <any>` | `nameIdToClass`
    `protected <any>` | `nameToClass`
    `protected int` | `nextNameId`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractGryoClassResolver()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract Class` | `coerceType(Class clazz)` Called from `getRegistration(Class)` to determine the actual type.
    `Registration` | `getRegistration(Class clazz)`
    `Registration` | `getRegistration(int classID)`
    `protected Class<?>` | `getTypeByName(String className)`
    `Registration` | `readClass(Input input)`
    `protected Registration` | `readName(Input input)`
    `Registration` | `register(Registration registration)`
    `Registration` | `registerImplicit(Class type)`
    `void` | `reset()`
    `void` | `setKryo(Kryo kryo)`
    `Registration` | `writeClass(Output output, Class type)`
    `protected void` | `writeName(Output output, Class type)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### NAME

          public static final byte NAME

      See Also:
        Constant Field Values

    - #### kryo

          protected Kryo kryo

    - #### idToRegistration

          protected final <any> idToRegistration

    - #### classToRegistration

          protected final <any> classToRegistration

    - #### classToNameId

          protected <any> classToNameId

    - #### nameIdToClass

          protected <any> nameIdToClass

    - #### nameToClass

          protected <any> nameToClass

    - #### nextNameId

          protected int nextNameId

  - ### Constructor Detail

    - #### AbstractGryoClassResolver

          public AbstractGryoClassResolver()

  - ### Method Detail

    - #### setKryo

          public void setKryo(Kryo kryo)

    - #### register

          public Registration register(Registration registration)

    - #### registerImplicit

          public Registration registerImplicit(Class type)

    - #### coerceType

          public abstract Class coerceType(Class clazz)

      Called from `getRegistration(Class)` to determine the actual type.

    - #### getRegistration

          public Registration getRegistration(Class clazz)

    - #### getRegistration

          public Registration getRegistration(int classID)

    - #### writeClass

          public Registration writeClass(Output output,
                                         Class type)

    - #### writeName

          protected void writeName(Output output,
                                   Class type)

    - #### readClass

          public Registration readClass(Input input)

    - #### readName

          protected Registration readName(Input input)

    - #### getTypeByName

          protected Class<?> getTypeByName(String className)

    - #### reset

          public void reset()

Copyright © 2013–2018 Apache Software Foundation. All rights reserved.