(int hash, int in)
| 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) // 广播请求并获取所有回复结果 |
nothing calls this directly
no test coverage detected