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

Method setLocalBean

ZezeJava/ZezeJava/src/main/java/Zeze/Game/Online.java:614–627  ·  view source on GitHub ↗
(long roleId, @NotNull String key, @NotNull T bean)

Source from the content-addressed store, hash-verified

612 }
613
614 public <T extends Bean> void setLocalBean(long roleId, @NotNull String key, @NotNull T bean) {
615 var bLocal = getLoginLocal(roleId);
616 beanFactory.register(bean);
617 var bAny = new BAny();
618 bAny.getAny().setBean(bean);
619 bLocal.getDatas().put(key, bAny);
620 if (HotManager.isHotModule(bean.getClass().getClassLoader())) {
621 var hotModule = (HotModule)bean.getClass().getClassLoader();
622 Transaction.whileCommit(() -> {
623 hotModule.stopEvents.add(this::onHotModuleStop);
624 hotModulesHaveLocal.add(hotModule);
625 });
626 }
627 }
628
629 public void removeLocalBean(long roleId, @NotNull String key) {
630 var bLocal = _tlocal.get(roleId);

Callers 1

saveRetreatsMethod · 0.95

Calls 10

getLoginLocalMethod · 0.95
getAnyMethod · 0.95
isHotModuleMethod · 0.95
whileCommitMethod · 0.95
getClassLoaderMethod · 0.80
putMethod · 0.65
addMethod · 0.65
registerMethod · 0.45
setBeanMethod · 0.45
getDatasMethod · 0.45

Tested by

no test coverage detected