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

Method getWeight

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

Source from the content-addressed store, hash-verified

122 }
123
124 public static long getWeight(TransactionContext tcx, final String node, final String neighbor){
125 return tcx.run(new Function<Transaction,Long>() {
126 public Long apply(Transaction tr){
127 ByteBuffer b = ByteBuffer.allocate(8);
128 b.order(ByteOrder.LITTLE_ENDIAN);
129 b.put(tr.get(wEdge.pack(Tuple.from(node,neighbor))).get());
130 return b.getLong(0);
131 }
132 });
133 }
134
135
136 public static void setNeighborNeighbors(TransactionContext tcx, final String node, final String neighbor, final String neighborsNeighbor){

Callers 1

smokeTestMethod · 0.95

Calls 1

runMethod · 0.65

Tested by

no test coverage detected