org.apache.tinkerpop.gremlin.structure.util.star

## Class StarGraphSerializer

- java.lang.Object
- - org.apache.tinkerpop.gremlin.structure.util.star.StarGraphSerializer

- All Implemented Interfaces:
    SerializerShim<StarGraph>

      public class StarGraphSerializer
      extends Object
      implements SerializerShim<StarGraph>

  Kryo serializer for `StarGraph`. Implements an internal versioning capability for backward compatibility. The single byte at the front of the serialization stream denotes the version. That version can be used to choose the correct deserialization mechanism. The limitation is that this versioning won't help with backward compatibility for custom serializers from providers. Providers should be encouraged to write their serializers with backward compatibility in mind.
  Author:
    Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StarGraphSerializer(Direction edgeDirectionToSerialize, GraphFilter graphFilter)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<I extends InputShim> StarGraph` | `read(KryoShim<I,?> kryo, I input, Class<StarGraph> clazz)` If the returned `StarGraph` is null, that means that the `GraphFilter` filtered the vertex.
    `<O extends OutputShim> void` | `write(KryoShim<?,O> kryo, O output, StarGraph starGraph)`

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

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

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.structure.io.gryo.kryoshim.SerializerShim

      `isImmutable`

- - ### Constructor Detail

    - #### StarGraphSerializer

          public StarGraphSerializer(Direction edgeDirectionToSerialize,
                                     GraphFilter graphFilter)

  - ### Method Detail

    - #### write

          public <O extends OutputShim> void write(KryoShim<?,O> kryo,
                                                   O output,
                                                   StarGraph starGraph)

      Specified by:
        `write` in interface `SerializerShim<StarGraph>`

    - #### read

          public <I extends InputShim> StarGraph read(KryoShim<I,?> kryo,
                                                      I input,
                                                      Class<StarGraph> clazz)

      If the returned `StarGraph` is null, that means that the `GraphFilter` filtered the vertex.
      Specified by:
        `read` in interface `SerializerShim<StarGraph>`

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