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

Method Changes

ZezeJava/ZezeJava/src/main/java/Zeze/Transaction/Changes.java:25–36  ·  view source on GitHub ↗
(@NotNull Transaction t, Procedure proc)

Source from the content-addressed store, hash-verified

23 private final boolean isHistory;
24
25 public Changes(@NotNull Transaction t, Procedure proc) {
26 isHistory = proc.getZeze().getConfig().isHistory();
27 // transaction = t;
28 // 建立脏记录的表的监听者的快照,以后收集日志和通知监听者都使用这个快照,避免由于监听者发生变化造成收集和通知不一致。
29 for (var ar : t.getAccessedRecords().values()) {
30 if (ar.dirty) {
31 var listeners = ar.atomicTupleRecord.record.getTable().getChangeListenerMap().getListeners();
32 if (!listeners.isEmpty())
33 this.listeners.putIfAbsent(ar.atomicTupleRecord.record.getTable(), listeners);
34 }
35 }
36 }
37
38 public @NotNull LongHashMap<LogBean> getBeans() {
39 return beans;

Callers

nothing calls this directly

Calls 10

isHistoryMethod · 0.80
getAccessedRecordsMethod · 0.80
getListenersMethod · 0.80
getChangeListenerMapMethod · 0.80
getZezeMethod · 0.65
valuesMethod · 0.65
getTableMethod · 0.65
isEmptyMethod · 0.65
putIfAbsentMethod · 0.65
getConfigMethod · 0.45

Tested by

no test coverage detected