Class GraphBinaryIo
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.structure.io.binary.GraphBinaryIo
-
- All Implemented Interfaces:
Io
public class GraphBinaryIo extends Object implements Io
This is a dummy implementation ofIo
which is only used in the context of helping to configure a GraphBinaryMessageSerializer
with anIoRegistry
. It's methods are not implemented.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.io.Io
Io.Builder<I extends Io>, Io.Exceptions
-
-
Constructor Summary
Constructors Constructor Description GraphBinaryIo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mapper.Builder
mapper()
Constructs aMapper.Builder
which is responsible for constructing the abstraction over different serialization methods.GraphReader.ReaderBuilder
reader()
Creates aGraphReader.ReaderBuilder
implementation .void
readGraph(String file)
Read aGraph
from file using the default configuration of theIo.reader()
and its suppliedIo.mapper()
.void
writeGraph(String file)
Write aGraph
to file using the default configuration of theIo.writer()
and its suppliedIo.mapper()
.GraphWriter.WriterBuilder
writer()
Creates aGraphWriter.WriterBuilder
implementation .
-
-
-
Method Detail
-
reader
public GraphReader.ReaderBuilder reader()
Description copied from interface:Io
Creates aGraphReader.ReaderBuilder
implementation . Implementers should call theIo.mapper()
function to feed its result to the builder. In this way, custom class serializers registered to theMapper.Builder
byGraph
implementations will end up being used for the serialization process.
-
writer
public GraphWriter.WriterBuilder writer()
Description copied from interface:Io
Creates aGraphWriter.WriterBuilder
implementation . Implementers should call theIo.mapper()
function to feed its result to the builder. In this way, custom class serializers registered to theMapper.Builder
byGraph
implementations will end up being used for the serialization process.
-
mapper
public Mapper.Builder mapper()
Description copied from interface:Io
Constructs aMapper.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 toMapper.Builder.addRegistry(IoRegistry)
which will provide the builder with any required custom serializers of theGraph
.
-
writeGraph
public void writeGraph(String file) throws IOException
Description copied from interface:Io
Write aGraph
to file using the default configuration of theIo.writer()
and its suppliedIo.mapper()
.- Specified by:
writeGraph
in interfaceIo
- Throws:
IOException
-
readGraph
public void readGraph(String file) throws IOException
Description copied from interface:Io
Read aGraph
from file using the default configuration of theIo.reader()
and its suppliedIo.mapper()
.- Specified by:
readGraph
in interfaceIo
- Throws:
IOException
-
-