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

## Class GryoIo

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

- All Implemented Interfaces:
    Io<GryoReader.Builder,GryoWriter.Builder,GryoMapper.Builder>

      public final class GryoIo
      extends Object
      implements Io<GryoReader.Builder,GryoWriter.Builder,GryoMapper.Builder>

  Constructs Gryo IO implementations given a `Graph` and `IoRegistry`. Implementers of the `Graph` interfaces should see the `GryoMapper` for information on the expectations for the `IoRegistry`.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `GryoIo.Builder`

    - ### Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.io.Io

      `Io.Exceptions`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Io.Builder<GryoIo>` | `build()`
    `GryoMapper.Builder` | `mapper()` Constructs a `Mapper.Builder` which is responsible for constructing the abstraction over different serialization methods.
    `GryoReader.Builder` | `reader()` Creates a `GraphReader.ReaderBuilder` implementation .
    `void` | `readGraph(String file)` Read a `Graph` from file using the default configuration of the `Io.reader()` and its supplied `Io.mapper()`.
    `void` | `writeGraph(String file)` Write a `Graph` to file using the default configuration of the `Io.writer()` and its supplied `Io.mapper()`.
    `GryoWriter.Builder` | `writer()` Creates a `GraphWriter.WriterBuilder` implementation .

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

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

- - ### Method Detail

    - #### reader

          public GryoReader.Builder reader()

      Creates a `GraphReader.ReaderBuilder` implementation . Implementers should call the `Io.mapper()` function to feed its result to the builder. In this way, custom class serializers registered to the `Mapper.Builder` by `Graph` implementations will end up being used for the serialization process.
      Specified by:
        `reader` in interface `Io<GryoReader.Builder,GryoWriter.Builder,GryoMapper.Builder>`

    - #### writer

          public GryoWriter.Builder writer()

      Creates a `GraphWriter.WriterBuilder` implementation . Implementers should call the `Io.mapper()` function to feed its result to the builder. In this way, custom class serializers registered to the `Mapper.Builder` by `Graph` implementations will end up being used for the serialization process.
      Specified by:
        `writer` in interface `Io<GryoReader.Builder,GryoWriter.Builder,GryoMapper.Builder>`

    - #### mapper

          public GryoMapper.Builder mapper()

      Constructs a `Mapper.Builder` which is responsible for constructing the abstraction over different serialization methods. Implementations should set defaults as required, but most importantly need to make the appropriate call to `Mapper.Builder.addRegistry(IoRegistry)` which will provide the builder with any required custom serializers of the `Graph`.
      Specified by:
        `mapper` in interface `Io<GryoReader.Builder,GryoWriter.Builder,GryoMapper.Builder>`

    - #### writeGraph

          public void writeGraph(String file)
                          throws IOException

      Write a `Graph` to file using the default configuration of the `Io.writer()` and its supplied `Io.mapper()`.
      Specified by:
        `writeGraph` in interface `Io<GryoReader.Builder,GryoWriter.Builder,GryoMapper.Builder>`
      Throws:
        `IOException`

    - #### readGraph

          public void readGraph(String file)
                         throws IOException

      Read a `Graph` from file using the default configuration of the `Io.reader()` and its supplied `Io.mapper()`.
      Specified by:
        `readGraph` in interface `Io<GryoReader.Builder,GryoWriter.Builder,GryoMapper.Builder>`
      Throws:
        `IOException`

    - #### build

          public static Io.Builder<GryoIo> build()

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