JanusGraph·Java写数据

     

  JanusGraph graph = JanusGraphFactory.build().set("storage.backend", "inmemory").set("storage.hostname", "10.158.69.75").open();
 JanusGraphManagement mgmt = graph.openManagement();
 VertexLabel vertexLabel = mgmt.makeVertexLabel(label).make();
 mgmt.makeEdgeLabel(label).make();
 Vertex v1 = graph.addVertex(type);
 ....
 graph.tx().commit();

 

你可能感兴趣的:(图数据库)