use of org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1 in project janusgraph by JanusGraph.
the class AbstractJanusGraphAssemblyIT method createGraphBinaryMessageSerializerV1.
protected MessageSerializer createGraphBinaryMessageSerializerV1() {
final GraphBinaryMessageSerializerV1 serializer = new GraphBinaryMessageSerializerV1();
final Map<String, Object> config = new HashMap<>();
config.put(TOKEN_IO_REGISTRIES, Collections.singletonList(JanusGraphIoRegistry.class.getName()));
serializer.configure(config, Collections.emptyMap());
return serializer;
}
use of org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1 in project janusgraph by JanusGraph.
the class GeoshapeGraphBinarySerializerTest method shouldSerializeViaIoRegistry.
@ParameterizedTest
@MethodSource("geoshapeProvider")
public void shouldSerializeViaIoRegistry(Geoshape geoshape) throws IOException {
final GraphBinaryMessageSerializerV1 serializer = new GraphBinaryMessageSerializerV1();
final Map<String, Object> config = new HashMap<>();
config.put(TOKEN_IO_REGISTRIES, Collections.singletonList(JanusGraphIoRegistry.class.getName()));
serializer.configure(config, Collections.emptyMap());
assertSymmetricGeoshapeSerializationInResponseMessage(serializer, geoshape);
}
use of org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1 in project janusgraph by JanusGraph.
the class RelationIdentifierGraphBinarySerializerTest method shouldSerializeViaIoRegistry.
@ParameterizedTest
@MethodSource("relationIdentifierProvider")
public void shouldSerializeViaIoRegistry(final RelationIdentifier relationIdentifier) throws IOException {
final GraphBinaryMessageSerializerV1 serializer = new GraphBinaryMessageSerializerV1();
final Map<String, Object> config = new HashMap<>();
config.put(TOKEN_IO_REGISTRIES, Collections.singletonList(JanusGraphIoRegistry.class.getName()));
serializer.configure(config, Collections.emptyMap());
assertRelationIdentifier(serializer, relationIdentifier);
}
use of org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1 in project janusgraph by JanusGraph.
the class RelationIdentifierGraphBinarySerializerTest method shouldCustomSerialization.
@ParameterizedTest
@MethodSource("relationIdentifierProvider")
public void shouldCustomSerialization(final RelationIdentifier relationIdentifier) throws IOException {
final GraphBinaryMessageSerializerV1 serializer = new GraphBinaryMessageSerializerV1(TypeSerializerRegistry.build().addCustomType(RelationIdentifier.class, new RelationIdentifierGraphBinarySerializer()).create());
assertRelationIdentifier(serializer, relationIdentifier);
}
use of org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1 in project janusgraph by JanusGraph.
the class JanusGraphPGraphBinarySerializerTest method shouldSerializePersonViaIoRegistry.
@ParameterizedTest
@MethodSource("janusGraphPProvider")
public void shouldSerializePersonViaIoRegistry(final JanusGraphP predicate) throws IOException {
final GraphBinaryMessageSerializerV1 serializer = new GraphBinaryMessageSerializerV1();
final Map<String, Object> config = new HashMap<>();
config.put(TOKEN_IO_REGISTRIES, Collections.singletonList(JanusGraphIoRegistry.class.getName()));
serializer.configure(config, Collections.emptyMap());
assertJanusGraphP(serializer, predicate);
}
Aggregations