public final class StarGraphGryoSerializer
extends <any>
StarGraph
. Implements an internal versioning capability for backward compatibility.
The single byte at the front of the serialization stream denotes the version. That version can be used to choose
the correct deserialization mechanism. The limitation is that this versioning won't help with backward
compatibility for custom serializers from vendors. Vendors should be encouraged to write their serializers
with backward compatibility in mind.Modifier and Type | Method and Description |
---|---|
StarGraph |
read(Kryo kryo,
Input input,
Class<StarGraph> aClass)
If the returned
StarGraph is null, that means that the GraphFilter filtered the vertex. |
static StarGraphGryoSerializer |
with(Direction direction)
Gets a serializer from the cache.
|
static StarGraphGryoSerializer |
withGraphFilter(GraphFilter graphFilter) |
void |
write(Kryo kryo,
Output output,
StarGraph starGraph) |
public static StarGraphGryoSerializer with(Direction direction)
null
for the direction when requiring a serializer that
doesn't serialize the edges of a vertex.public static StarGraphGryoSerializer withGraphFilter(GraphFilter graphFilter)
public void write(Kryo kryo, Output output, StarGraph starGraph)
public StarGraph read(Kryo kryo, Input input, Class<StarGraph> aClass)
StarGraph
is null, that means that the GraphFilter
filtered the vertex.Copyright © 2013–2016 Apache Software Foundation. All rights reserved.