public class GryoWriter extends Object implements GraphWriter
GraphWriter
for the Gremlin Structure serialization format based on Kryo. The format is meant to be
non-lossy in terms of Gremlin Structure to Gremlin Structure migrations (assuming both structure implementations
support the same graph features).Modifier and Type | Class and Description |
---|---|
static class |
GryoWriter.Builder |
Modifier and Type | Field and Description |
---|---|
static byte[] |
DELIMITER |
Modifier and Type | Method and Description |
---|---|
static GryoWriter.Builder |
build() |
void |
writeEdge(OutputStream outputStream,
Edge e)
Write an edge to a stream.
|
void |
writeGraph(OutputStream outputStream,
Graph g)
Write the entire graph to a stream.
|
void |
writeObject(OutputStream outputStream,
Object object) |
void |
writeVertex(OutputStream outputStream,
Vertex v)
Write a vertex to a stream without writing its edges.
|
void |
writeVertex(OutputStream outputStream,
Vertex v,
Direction direction)
Write a vertex to a stream with its associated edges.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
writeVertices, writeVertices
public void writeGraph(OutputStream outputStream, Graph g) throws IOException
GraphWriter
writeGraph
in interface GraphWriter
IOException
public void writeVertex(OutputStream outputStream, Vertex v, Direction direction) throws IOException
GraphWriter
writeVertex
in interface GraphWriter
outputStream
- The stream to write to.v
- The vertex to write.direction
- If direction is null then no edges are written.IOException
public void writeVertex(OutputStream outputStream, Vertex v) throws IOException
GraphWriter
writeVertex
in interface GraphWriter
outputStream
- The stream to write to.v
- The vertex to write.IOException
public void writeEdge(OutputStream outputStream, Edge e) throws IOException
GraphWriter
writeEdge
in interface GraphWriter
IOException
public void writeObject(OutputStream outputStream, Object object)
public static GryoWriter.Builder build()
Copyright © 2013–2015 Apache Software Foundation. All rights reserved.