MCPcopy Create free account
hub / github.com/apple/foundationdb / setEdge

Method setEdge

recipes/java-recipes/MicroGraph.java:54–62  ·  view source on GitHub ↗
(TransactionContext tcx, final String node, final String neighbor)

Source from the content-addressed store, hash-verified

52 // TODO These next five methods (setEdge, deleteEdge, getOutNeighbors, getInNeighbors,
53 // and getNeighbors) are all in the recipe book.
54 public static void setEdge(TransactionContext tcx, final String node, final String neighbor){
55 tcx.run(new Function<Transaction,Void>() {
56 public Void apply(Transaction tr){
57 tr.set(edge.pack(Tuple.from(node,neighbor)), Tuple.from().pack());
58 tr.set(inverse.pack(Tuple.from(neighbor,node)), Tuple.from().pack());
59 return null;
60 }
61 });
62 }
63
64 public static void deleteEdge(TransactionContext tcx, final String node, final String neighbor){
65 tcx.run(new Function<Transaction,Void>() {

Callers 1

smokeTestMethod · 0.95

Calls 1

runMethod · 0.65

Tested by

no test coverage detected