org.apache.tinkerpop.gremlin.structure.io

## Interface Io.Builder<I extends Io>

- All Known Implementing Classes:
    GraphMLIo.Builder, GraphSONIo.Builder, GryoIo.Builder
  Enclosing interface:
    Io<R extends GraphReader.ReaderBuilder,W extends GraphWriter.WriterBuilder,M extends Mapper.Builder>

      public static interface Io.Builder<I extends Io>

  Helps to construct an `Io` implementation and should be implemented by every such implementation as that class will be passed to `Graph.io(Io.Builder)` by the user.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `I` | `create()` Providers call this method in the `Graph.io(Io.Builder)` method to construct the `Io` instance and return the value.
    `Io.Builder<? extends Io>` | `graph(Graph g)` Providers use this method to supply the current instance of their `Graph` to the builder.
    `Io.Builder<? extends Io>` | `onMapper(Consumer<Mapper.Builder> onMapper)` Allows a `Graph` implementation to have full control over the `Mapper.Builder` instance.
    `Io.Builder<? extends Io>` | `registry(IoRegistry registry)` Deprecated. As of release 3.2.2, replaced by `onMapper(Consumer)`.

- - ### Method Detail

    - #### registry

          @Deprecated
          Io.Builder<? extends Io> registry(IoRegistry registry)

      Deprecated. As of release 3.2.2, replaced by `onMapper(Consumer)`.
      Providers use this method to supply an `IoRegistry` to the `Io` implementation. End-users should not use this method directly. If a user wants to register custom serializers, then such things can be done via calls to `Io.mapper()` after the `Io` is constructed via `Graph.io(Io.Builder)`.

    - #### onMapper

          Io.Builder<? extends Io> onMapper(Consumer<Mapper.Builder> onMapper)

      Allows a `Graph` implementation to have full control over the `Mapper.Builder` instance. Typically, the implementation will just pass in its `IoRegistry` implementation so that the `Mapper` that gets built will have knowledge of any custom classes and serializers it may have. Note that if `registry(IoRegistry)` is also set on a `Builder` instance it will be applied first prior to that instance being passed to `Consumer`.

      End-users should not use this method directly. If a user wants to register custom serializers, then such things can be done via calls to `Io.mapper()` after the `Io` is constructed via `Graph.io(Io.Builder)`.

    - #### graph

          Io.Builder<? extends Io> graph(Graph g)

      Providers use this method to supply the current instance of their `Graph` to the builder. End-users should not call this method directly.

    - #### create

          I create()

      Providers call this method in the `Graph.io(Io.Builder)` method to construct the `Io` instance and return the value. End-users will typically not call this method.

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