MCPcopy Create free account
hub / github.com/e2wugui/zeze / update

Method update

ZezeJava/ZezeJava/src/main/java/Zeze/Raft/RocksRaft/Test.java:274–292  ·  view source on GitHub ↗
(Table<Integer, Bean1> table, int num)

Source from the content-addressed store, hash-verified

272 }
273
274 private static void update(Table<Integer, Bean1> table, int num) {
275 var value = table.getOrAdd(1);
276
277 // 本层Bean变量修改日志
278 value.setI(1 + num);
279
280 // 下一层Bean变量修改日志
281 value.getBean2().setI(2 + num);
282
283 // 本层Bean容器变量修改日志
284 value.getMap1().put(3 + num, 3 + num);
285
286 // 本层Bean容器变量修改日志2
287 var bean1 = new Bean1();
288 value.getMap2().put(4 + num, bean1);
289
290 // 容器内Bean修改日志。
291 bean1.setI(5 + num);
292 }
293
294 private static void verifyChanges(String expected) {
295 Transaction.getCurrent().runWhileCommit(() -> {

Callers 3

putAndEditMethod · 0.95
editMethod · 0.95
editAndPutMethod · 0.95

Calls 6

setIMethod · 0.95
getBean2Method · 0.80
getMap1Method · 0.80
getMap2Method · 0.80
putMethod · 0.65
getOrAddMethod · 0.45

Tested by

no test coverage detected