I'm using a TinkerPop3 Traversal in Java, and I want to update output vertices, edit them and then have that edited vertex not show up again while the traversal continues. Is this possible?
This code:
TinkerGraph tg = TinkerGraph.open();
/**add some vertices and edges**/
GraphTraversalSource gt = tg.traversal();
GraphTraversal<Vertex, Map<String,Object>> traversal = gt.V()
.has("processed",false).as("initial")
.out()
.aggregate("vertices")
.select("initial","vertices");
while(traversal.hasNext()){
initial.property("processed",true);
}
Will repeatedly spit out the first vertex that it finds over and over, even though I have set the "processed" property to true.
What can I do to fix or work around this?