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

Method TestHash

ZezeJava/ZezexJava/server/src/Game/Rank/ModuleRank.java:70–83  ·  view source on GitHub ↗
(int hash, int in)

Source from the content-addressed store, hash-verified

68
69 // 第一个参数hash是固定的特殊参数
70 @Override
71 @RedirectHash(version = 2) // 单发给某个hash值指定的server执行,可能是本服,找不到hash节点也会在本服执行. 返回类型同ToServer
72 public RedirectFuture<TestHashResult> TestHash(int hash, int in) { // 首个参数hash是固定必要的特殊参数,后面是自定义输入参数
73 var f = new RedirectFuture<TestHashResult>();
74 Task.run(App.Zeze.newProcedure(() -> {
75 TestHashResult result = new TestHashResult();
76 result.setHash(hash);
77 result.setOut(in);
78 result.setServerId(App.Zeze.getConfig().getServerId());
79 f.setResult(result); // 异步完成
80 return Procedure.Success;
81 }, "TestHashAsync"), null, null, DispatchMode.Normal);
82 return f;
83 }
84
85 @Override
86 @RedirectAll(version = 3) // 广播请求并获取所有回复结果

Callers

nothing calls this directly

Calls 7

runMethod · 0.95
setResultMethod · 0.95
setHashMethod · 0.80
getServerIdMethod · 0.65
newProcedureMethod · 0.45
setServerIdMethod · 0.45
getConfigMethod · 0.45

Tested by

no test coverage detected