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

Method tryRemoveLocal

ZezeJava/ZezeJava/src/main/java/Zeze/Arch/Online.java:1570–1587  ·  view source on GitHub ↗
(@NotNull String account)

Source from the content-addressed store, hash-verified

1568 }
1569
1570 private long tryRemoveLocal(@NotNull String account) throws Exception {
1571 var local = _tlocal.get(account);
1572 if (local == null)
1573 return 0;
1574 var online = getOnline(account);
1575 // 在全局数据中查找login-local,删除不存在或者版本不匹配的。
1576 for (var e : local.getLogins().entrySet()) {
1577 var clientId = e.getKey();
1578 var login = online != null ? online.getLogins().get(clientId) : null;
1579 if (login == null || login.getLink().getState() == eOffline
1580 || login.getLoginVersion() != e.getValue().getLoginVersion()) {
1581 var ret = removeLocalAndTrigger(account, clientId);
1582 if (ret != 0)
1583 return ret;
1584 }
1585 }
1586 return 0;
1587 }
1588
1589 @RedirectToServer
1590 @TransactionLevelAnnotation(Level = TransactionLevel.None)

Callers 2

redirectRemoveLocalMethod · 0.95
performMethod · 0.45

Calls 10

getOnlineMethod · 0.95
removeLocalAndTriggerMethod · 0.95
getMethod · 0.65
getKeyMethod · 0.65
getStateMethod · 0.65
getLinkMethod · 0.65
getLoginVersionMethod · 0.65
getValueMethod · 0.65
entrySetMethod · 0.45
getLoginsMethod · 0.45

Tested by

no test coverage detected