Interface Io.Builder<I extends Io>
-
- 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 anIo
implementation and should be implemented by every such implementation as that class will be passed toGraph.io(Io.Builder)
by the user.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description I
create()
Providers call this method in theGraph.io(Io.Builder)
method to construct theIo
instance and return the value.Io.Builder<? extends Io>
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
Io.Builder<? extends Io> onMapper(Consumer<Mapper.Builder> onMapper)
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)
.
-
graph
Io.Builder<? extends Io> graph(Graph g)
Providers use this method to supply the current instance of theirGraph
to the builder. End-users should not call this method directly.
-
requiresVersion
<V> boolean requiresVersion(V version)
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.
-
create
I create()
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.
-
-