Class GraphSONIo.Builder
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONIo.Builder
-
- All Implemented Interfaces:
Io.Builder<GraphSONIo>
- Enclosing class:
- GraphSONIo
public static final class GraphSONIo.Builder extends Object implements Io.Builder<GraphSONIo>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphSONIo
create()
Providers call this method in theGraph.io(Io.Builder)
method to construct theIo
instance and return the value.Io.Builder<GraphSONIo>
graph(Graph g)
Providers use this method to supply the current instance of theirGraph
to the builder.Io.Builder<? extends Io>
onMapper(Consumer<Mapper.Builder> onMapper)
Allows aGraph
implementation to have full control over theMapper.Builder
instance.<V> boolean
requiresVersion(V version)
Determines if the version matches the one configured for this builder.
-
-
-
Method Detail
-
onMapper
public Io.Builder<? extends Io> onMapper(Consumer<Mapper.Builder> onMapper)
Description copied from interface:Io.Builder
Allows aGraph
implementation to have full control over theMapper.Builder
instance. Typically, the implementation will just pass in itsIoRegistry
implementation so that theMapper
that gets built will have knowledge of any custom classes and serializers it may have. End-users should not use this method directly. If a user wants to register custom serializers, then such things can be done via calls toIo.mapper()
after theIo
is constructed viaGraph.io(Io.Builder)
.- Specified by:
onMapper
in interfaceIo.Builder<GraphSONIo>
-
graph
public Io.Builder<GraphSONIo> graph(Graph g)
Description copied from interface:Io.Builder
Providers use this method to supply the current instance of theirGraph
to the builder. End-users should not call this method directly.- Specified by:
graph
in interfaceIo.Builder<GraphSONIo>
-
requiresVersion
public <V> boolean requiresVersion(V version)
Description copied from interface:Io.Builder
Determines if the version matches the one configured for this builder. Graph providers can use this in calls toGraph.io(Builder)
to figure out the correct versions of registries to add.- Specified by:
requiresVersion
in interfaceIo.Builder<GraphSONIo>
-
create
public GraphSONIo create()
Description copied from interface:Io.Builder
Providers call this method in theGraph.io(Io.Builder)
method to construct theIo
instance and return the value. End-users will typically not call this method.- Specified by:
create
in interfaceIo.Builder<GraphSONIo>
-
-