Interface TypeRegistration<T>

  • Type Parameters:
    T - the serializable type

    public interface TypeRegistration<T>
    Represents a class serializable with Gryo.

    At most one of the getShadedSerializer(), getSerializerShim(), and getFunctionOfShadedKryo() will return a non-null value. If all three methods return null, then there is no custom serialization logic associated with this class. Gryo/Kryo will use its default serializer.

    • Method Detail

      • getTargetClass

        Class<T> getTargetClass()
        the serializable class this instance describes
      • getId

        int getId()
        numeric identifier used as a shorthand for this type in Gryo's serialized form
      • getShadedSerializer

        org.apache.tinkerpop.shaded.kryo.Serializer<T> getShadedSerializer()
        the shaded-Kryo serializer that handles this type, if one is defined
      • getSerializerShim

        SerializerShim<T> getSerializerShim()
        the shim-Kryo serializer that handles this type, if one is defined
      • getFunctionOfShadedKryo

        Function<org.apache.tinkerpop.shaded.kryo.Kryo,​org.apache.tinkerpop.shaded.kryo.Serializer> getFunctionOfShadedKryo()
        a function that accepts a shaded-Kryo instance and returns a serializer, if such a function is defined
      • registerWith

        org.apache.tinkerpop.shaded.kryo.Kryo registerWith​(org.apache.tinkerpop.shaded.kryo.Kryo kryo)
        Registers this type on the supplied Kryo instance, using whatever custom serializer may be present, then returns the same Kryo instance supplied as the parameter.
        kryo - Kryo instance into which this type is registered
        the sole parameter